Fix pythonnondynamic feature for modern classes
Fixes nondynamic mode when an instance variable is set with the same name as a class variable in a class derived from a SWIG proxy class. The python_nondynamic testcase now works using -modern and testcase enhanced slightly too. Fixes #718
This commit is contained in:
parent
5ce880ee41
commit
fe082382c7
3 changed files with 112 additions and 26 deletions
|
|
@ -54,5 +54,14 @@
|
|||
int b;
|
||||
};
|
||||
|
||||
int retrieve_A_a(const struct A* self) { return self->a; }
|
||||
int retrieve_A_b(const struct A* self) { return self->b; }
|
||||
%}
|
||||
%inline %{
|
||||
#ifdef SWIGPYTHON_BUILTIN
|
||||
int is_python_builtin() { return 1; }
|
||||
#else
|
||||
int is_python_builtin() { return 0; }
|
||||
#endif
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue