[Python] Allow reinitialisation to work with an embedded Python

interpreter (patch from Jim Carroll in SF#3075178).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12235 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2010-10-01 04:01:08 +00:00
commit c636855bcc
2 changed files with 9 additions and 1 deletions

View file

@ -979,10 +979,13 @@ _SWIG_This(void)
return SWIG_Python_str_FromChar("this");
}
static PyObject *swig_this = NULL;
SWIGRUNTIME PyObject *
SWIG_This(void)
{
static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
if (swig_this == NULL)
swig_this = _SWIG_This();
return swig_this;
}
@ -1413,6 +1416,7 @@ SWIG_Python_DestroyModule(void *vptr)
}
}
Py_DECREF(SWIG_This());
swig_this = NULL;
}
SWIGRUNTIME void