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:
parent
a172b1d4b0
commit
3d6dcc3ce6
1 changed files with 13 additions and 1 deletions
|
|
@ -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 {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue