From: <dav...@da...> - 2008-12-16 04:13:21
|
SWIG turns #define statements into wrapped constants. The warning message you are getting is SWIG telling you that it already created a constant called "X". The #undef is handled properly by the preprocessor, but that's unrelated to this error. -Dave On Sat 12/13/08 11:11 AM , "Robin Allen" rob...@gm... sent: > Hello, > > I've been using SWIG for a while now (1.3.36) and I'm surprised I've > only just come across this. The following module: > > %module test; > #define X "test" > #undef X > #define X "test2" > > Compiled with > > swig -python test.i > > ...causes SWIG to say: > > test.i(4): Warning(302): Identifier 'X' redefined (ignored), > test.i(2): Warning(302): previous definition of 'X'. > > Does SWIG ignore the #undef directive, or am I being dumb? > > -Rob > > --------------------------------------------------------------------------- > ---SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, > Nevada.The future of the web can't happen without you. Join us at MIX09 to > helppave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009. > visitmix.com/_______________________________________________ > Swig-user mailing list > Swi...@li...https://lists.sourceforge.net/lists/listinfo/swig-user > > |