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

@ -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