Additional static member variable testing for Python

This commit is contained in:
William S Fulton 2016-10-12 19:18:32 +01:00
commit 9135ad72e2
2 changed files with 52 additions and 4 deletions

View file

@ -22,5 +22,28 @@ public:
%}
%{
int StaticMemberTest::static_int;
int StaticMemberTest::static_int = 99;
%}
%inline %{
struct StaticBase {
static int statty;
virtual ~StaticBase() {}
};
struct StaticDerived : StaticBase {
static int statty;
};
%}
%{
int StaticBase::statty = 11;
int StaticDerived::statty = 111;
%}
%inline %{
#ifdef SWIGPYTHON_BUILTIN
bool is_python_builtin() { return true; }
#else
bool is_python_builtin() { return false; }
#endif
%}