[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

@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.1 (in progress) Version 2.0.1 (in progress)
=========================== ===========================
2010-10-01: olly
[Python] Allow reinitialisation to work with an embedded Python
interpreter (patch from Jim Carroll in SF#3075178).
2010-09-28: wsfulton 2010-09-28: wsfulton
[C#] Apply patch from Tomas Dirvanauskas for std::map wrappers to avoid [C#] Apply patch from Tomas Dirvanauskas for std::map wrappers to avoid
throwing exceptions with normal usage of iterators. throwing exceptions with normal usage of iterators.

View file

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