summaryrefslogtreecommitdiff
path: root/Lib/swiginit.swg
diff options
context:
space:
mode:
authorMark Gossage <mark@gossage.cjb.net>2006-09-18 05:44:22 +0000
committerMark Gossage <mark@gossage.cjb.net>2006-09-18 05:44:22 +0000
commit477f02020bd51395430f778a585358a390288c3f (patch)
treef64ca5c88ab3e9597b7b4d4624c5ac6125da4174 /Lib/swiginit.swg
parentc0082db527a87e5d798324931a1575658b3f0e2d (diff)
downloadswig-477f02020bd51395430f778a585358a390288c3f.tar.gz
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/SWIG@9294 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/swiginit.swg')
-rw-r--r--Lib/swiginit.swg16
1 files changed, 9 insertions, 7 deletions
diff --git a/Lib/swiginit.swg b/Lib/swiginit.swg
index c196a8c01..8b568b22f 100644
--- a/Lib/swiginit.swg
+++ b/Lib/swiginit.swg
@@ -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;