summaryrefslogtreecommitdiff
path: root/Lib/swiginit.swg
diff options
context:
space:
mode:
authorMark Gossage <mark@gossage.cjb.net>2008-01-24 06:16:45 +0000
committerMark Gossage <mark@gossage.cjb.net>2008-01-24 06:16:45 +0000
commit09113cc0bf0d630cef2234ae336344cf2dc6a1e2 (patch)
tree54ef5770538f81638c170104861c5db0de544f03 /Lib/swiginit.swg
parent76229dbab8be7411edc851af2df21c3d082e5b33 (diff)
downloadswig-09113cc0bf0d630cef2234ae336344cf2dc6a1e2.tar.gz
[lua] updated configure script yet again
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10218 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/swiginit.swg')
-rw-r--r--Lib/swiginit.swg11
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/swiginit.swg b/Lib/swiginit.swg
index d767abcee..903ac548f 100644
--- a/Lib/swiginit.swg
+++ b/Lib/swiginit.swg
@@ -55,7 +55,7 @@ SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
- int found;
+ int found, init;
clientdata = clientdata;
@@ -65,6 +65,9 @@ SWIG_InitializeModule(void *clientdata) {
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
swig_module.next = &swig_module;
+ init = 1;
+ } else {
+ init = 0;
}
/* Try and load any already created modules */
@@ -93,6 +96,12 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module;
}
+ /* When multiple interpeters are used, a module could have already been initialized in
+ a different interpreter, but not yet have a pointer in this interpreter.
+ In this case, we do not want to continue adding types... everything should be
+ set up already */
+ if (init == 0) return;
+
/* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: size %d\n", swig_module.size);