David Froger | 23 Jun 2012 02:08
Picon

Re: Python - Exporting macros as functions

Hi Simon,

A possibility is to manually write class extension with %extend:
http://swig.org/Doc2.0/Python.html#Python_nn43

Regards,
David

On Thu, 21 Jun 2012 16:04:39 +0200, Simon Busard <simon.busard <at> uclouvain.be> wrote:
> Hello,
> 
> I'm currently wrapping a large program using SWIG.
> 
> In some headers of this program, there are some macros like this one
> 
> #define node_get_type(node) node->type
> 
> Is it possible to ask SWIG to produce a function node_get_type() 
> corresponding to this macro?
> 
> thank you very in advance,
> 
> Regards,
> 
> Simon Busard
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Swig-user mailing list
> Swig-user <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/swig-user

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

Gmane