Embedding ruby - name clashes

B

Brian Candler

Something to consider when embedding ruby: ruby.h defines some short names
which may clash with your main program.

Right now I am working on openldap-2.2.0alpha and trying to incorporate a
back-ruby backend (based on back-perl). Unfortunately, both Ruby and
OpenLDAP define a constant called 'ID' :-(

In fact they are compatible - both are

typedef unsigned long ID;

So I'm having to do macro tricks to get around this. Also note that
RE_DUP_MAX, defined in [archdir]/ruby.h, is a duplicate of RE_DUP_MAX in
<sys/syslimits.h> under FreeBSD, although the macros are compatible and so I
just get a warning rather than an error.

Just thought I'd mention it anyway.

Cheers,

Brian.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top