Apply #3300072 from Christian Delbaere to fix multiple module loading not always sharing variables across modules.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12680 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-05-17 18:12:53 +00:00
commit f35dd29dff
3 changed files with 16 additions and 9 deletions

View file

@ -4,6 +4,10 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.4 (in progress)
===========================
2011-05-17: wsfulton
[Tcl] Apply #3300072 from Christian Delbaere to fix multiple module loading not
always sharing variables across modules.
2011-05-16: xavier98
[octave] Fix an incompatibility with never versions of Octave. Case on Octave
API >= 40 to handle rename of Octave_map to octave_map.

View file

@ -1,14 +1,17 @@
# This is the imports runtime testcase.
proc import {} {
if [ catch { load ./imports_b[info sharedlibextension] imports_b} err_msg ] {
puts stderr "Could not load shared object:\n$err_msg"
exit 1
}
if [ catch { load ./imports_a[info sharedlibextension] imports_a} err_msg ] {
puts stderr "Could not load shared object:\n$err_msg"
exit 1
}
}
if [ catch { load ./imports_b[info sharedlibextension] imports_b} err_msg ] {
puts stderr "Could not load shared object:\n$err_msg"
exit 1
}
if [ catch { load ./imports_a[info sharedlibextension] imports_a} err_msg ] {
puts stderr "Could not load shared object:\n$err_msg"
exit 1
}
import
set x [new_B]
A_hello $x

View file

@ -277,7 +277,7 @@ SWIG_Tcl_SetModule(Tcl_Interp *interp, swig_module_info *module) {
/* create a new pointer */
data = SWIG_PackData(buf, &module, sizeof(swig_type_info **));
*data = 0;
Tcl_SetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, 0);
Tcl_SetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, TCL_GLOBAL_ONLY);
}
/* -----------------------------------------------------------------------------*