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:
William S Fulton 2018-07-20 17:58:36 +01:00
commit fe082382c7
3 changed files with 112 additions and 26 deletions

View file

@ -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
%}