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.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10643 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2008-07-03 22:00:01 +00:00
commit 3d6dcc3ce6

View file

@ -26,14 +26,26 @@ UVW Bar::static_member_variable;
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 {
/*