fix SWIG_Python_TypeQuery for C/Ansi, ie, the old variable declared after code issue
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8967 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cb7662d14a
commit
7a5c6d8e90
1 changed files with 6 additions and 1 deletions
|
|
@ -1320,11 +1320,16 @@ SWIG_Python_SetModule(swig_module_info *swig_module) {
|
|||
}
|
||||
|
||||
/* The python cached type query */
|
||||
SWIGRUNTIME PyObject *
|
||||
SWIG_Python_TypeCache() {
|
||||
static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
|
||||
return cache;
|
||||
}
|
||||
|
||||
SWIGRUNTIME swig_type_info *
|
||||
SWIG_Python_TypeQuery(const char *type)
|
||||
{
|
||||
static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
|
||||
PyObject *cache = SWIG_Python_TypeCache();
|
||||
PyObject *key = PyString_FromString(type);
|
||||
PyObject *obj = PyDict_GetItem(cache, key);
|
||||
swig_type_info *descriptor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue