Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^6: SWIG and conflicting definitions

by hexcoder (Curate)
on Jan 08, 2016 at 22:54 UTC ( [id://1152356]=note: print w/replies, xml ) Need Help??


in reply to Re^5: SWIG and conflicting definitions
in thread SWIG and conflicting definitions

I agree mostly. Using
#include "perl.h" #include "XSUB.h" #undef XSPROTO #define XSPROTO(name) void name(pTHX_ struct cv* cv)
instead of
#define CV __perl_CV #include "perl.h" #include "XSUB.h" #undef XSPROTO #define XSPROTO(name) void name(pTHX_ __perl_CV* cv) #undef CV
is much more elegant and better. But both variants should work.

However SWIG_init is declared with two parameters.

In 'SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);' macro 'pTHHXo_' expands to 'PerlInterpreter*,'.

With the comma at the end there are suddenly two parameters.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1152356]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (9)
As of 2024-03-28 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found