[OTR-users] OTR Perl Module
Ian Goldberg
ian at cypherpunks.ca
Thu Jun 18 22:05:47 EDT 2009
On Thu, Jun 18, 2009 at 03:18:52PM -0700, Patrick Tierney wrote:
> Hello,
>
> I am writing a Perl module for OTR, and I've run into an unfortunate
> error: both Perl 5 and OTR declare structs called "context", and this
> results in an obvious redefinition error when compiling. I am writing
> the module using Inline / XS, and including perl's EXTERN.h, perl.h,
> XSUB.h, and INLINE.h, along with libotr/proto.h, etc.
>
> I would appreciate any suggestions on how to get around this, though I
> would also purpose changing the struct name to "otr_context" or such
> in future releases of the OTR library.
Stupid C with global structure name scope. ;-)
You can always do this trick:
#define context otr_context
#include <libotr/context.h>
#undef context
I haven't tested it, but it has a shot at working...
- Ian
More information about the OTR-users
mailing list