fix on swiginit.swg, has been reported to crash on several test cases
found and fixed problem in imports under python (mingw) git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9294 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f309ae3953
commit
5aef673f75
1 changed files with 9 additions and 7 deletions
|
|
@ -50,6 +50,7 @@ extern "C" {
|
|||
#define SWIGRUNTIME_DEBUG
|
||||
#endif
|
||||
|
||||
|
||||
SWIGRUNTIME void
|
||||
SWIG_InitializeModule(void *clientdata) {
|
||||
size_t i;
|
||||
|
|
@ -58,6 +59,14 @@ SWIG_InitializeModule(void *clientdata) {
|
|||
|
||||
clientdata = clientdata;
|
||||
|
||||
/* check to see if the circular list has been setup, if not, set it up */
|
||||
if (swig_module.next==0) {
|
||||
/* Initialize the swig_module */
|
||||
swig_module.type_initial = swig_type_initial;
|
||||
swig_module.cast_initial = swig_cast_initial;
|
||||
swig_module.next = &swig_module;
|
||||
}
|
||||
|
||||
/* Try and load any already created modules */
|
||||
module_head = SWIG_GetModule(clientdata);
|
||||
if (!module_head) {
|
||||
|
|
@ -65,13 +74,6 @@ SWIG_InitializeModule(void *clientdata) {
|
|||
/* so set the swig module into the interpreter */
|
||||
SWIG_SetModule(clientdata, &swig_module);
|
||||
module_head = &swig_module;
|
||||
/* check to see if the circular list has been setup, if not, set it up */
|
||||
if (swig_module.next==0) {
|
||||
/* Initialize the swig_module */
|
||||
swig_module.type_initial = swig_type_initial;
|
||||
swig_module.cast_initial = swig_cast_initial;
|
||||
swig_module.next = &swig_module;
|
||||
}
|
||||
} else {
|
||||
/* the interpreter has loaded a SWIG module, but has it loaded this one? */
|
||||
found=0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue