From: <ol...@us...> - 2008-07-03 22:00:06
|
Revision: 10643 http://swig.svn.sourceforge.net/swig/?rev=10643&view=rev Author: olly Date: 2008-07-03 15:00:01 -0700 (Thu, 03 Jul 2008) Log Message: ----------- The operator& trick in allowexcept.i doesn't work for SWIG/PHP because the generated code takes the address of the variable in the code in the "vinit" section. So comment out the private operator& for PHP. Modified Paths: -------------- trunk/Examples/test-suite/allowexcept.i Modified: trunk/Examples/test-suite/allowexcept.i =================================================================== --- trunk/Examples/test-suite/allowexcept.i 2008-07-03 14:55:03 UTC (rev 10642) +++ trunk/Examples/test-suite/allowexcept.i 2008-07-03 22:00:01 UTC (rev 10643) @@ -26,14 +26,26 @@ struct XYZ { }; +// The operator& trick doesn't work for SWIG/PHP because the generated code +// takes the address of the variable in the code in the "vinit" section. +#ifdef SWIGPHP %{ struct XYZ { void foo() {} private: XYZ& operator=(const XYZ& other); // prevent assignment used in normally generated set method - XYZ* operator&(); // prevent dereferencing used in normally generated get method }; %} +#else +%{ +struct XYZ { + void foo() {} +private: + XYZ& operator=(const XYZ& other); // prevent assignment used in normally generated set method + XYZ* operator&(); // prevent dereferencing used in normally generated get method +}; +%} +#endif #if defined(SWIGUTL) %exception { /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |