Tcl patches. Use [info sharedlibextension] to get file extension rather than hard-coding it]
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5301 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
54a11a5f75
commit
1b607484e2
25 changed files with 39 additions and 116 deletions
|
|
@ -1,12 +1,6 @@
|
|||
|
||||
if { [ string match $tcl_platform(platform) "windows" ] == 1 } {
|
||||
if [ catch { load ./bools.dll bools} err_msg ] {
|
||||
puts stderr "Could not load dll:\n$err_msg"
|
||||
}
|
||||
} else {
|
||||
if [ catch { load ./bools.so bools} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
if [ catch { load ./bools[info sharedlibextension] bools} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
|
||||
# bool constant check
|
||||
|
|
|
|||
|
|
@ -1,10 +1,4 @@
|
|||
|
||||
if { [ string match $tcl_platform(platform) "windows" ] == 1 } {
|
||||
if [ catch { load ./import_nomodule.dll import_nomodule} err_msg ] {
|
||||
puts stderr "Could not load dll:\n$err_msg"
|
||||
}
|
||||
} else {
|
||||
if [ catch { load ./import_nomodule.so import_nomodule} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
if [ catch { load ./import_nomodule[info sharedlibextension] import_nomodule} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,13 @@
|
|||
|
||||
# This is the imports runtime testcase.
|
||||
|
||||
if { [ string match $tcl_platform(os) Windows* ] == 1 } {
|
||||
if [ catch { load ./imports_a.dll imports_a} err_msg ] { ;# Windows
|
||||
puts stderr "Could not load dll:\n$err_msg"
|
||||
exit 1
|
||||
}
|
||||
if [ catch { load ./imports_b.dll imports_b} err_msg ] { ;# Windows
|
||||
puts stderr "Could not load dll:\n$err_msg"
|
||||
exit 1
|
||||
}
|
||||
} else {
|
||||
if [ catch { load ./imports_a.so imports_a} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
exit 1
|
||||
}
|
||||
if [ catch { load ./imports_b.so imports_b} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
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
|
||||
}
|
||||
|
||||
set x [new_B]
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
|
||||
if { [ string match $tcl_platform(platform) "windows" ] == 1 } {
|
||||
if [ catch { load ./overload_copy.dll overload_copy} err_msg ] {
|
||||
puts stderr "Could not load dll:\n$err_msg"
|
||||
}
|
||||
} else {
|
||||
if [ catch { load ./overload_copy.so overload_copy} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
if [ catch { load ./overload_copy[info sharedlibextension] overload_copy} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
|
||||
Foo f
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
|
||||
if { [ string match $tcl_platform(platform) "windows" ] == 1 } {
|
||||
if [ catch { load ./overload_simple.dll overload_simple} err_msg ] {
|
||||
puts stderr "Could not load dll:\n$err_msg"
|
||||
}
|
||||
} else {
|
||||
if [ catch { load ./overload_simple.so overload_simple} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
if [ catch { load ./overload_simple[info sharedlibextension] overload_simple} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
|
||||
set f [new_Foo]
|
||||
|
|
|
|||
|
|
@ -1,14 +1,8 @@
|
|||
# Primitive ref testcase. Tests to make sure references to
|
||||
# primitive types are passed by value
|
||||
|
||||
if { [ string match $tcl_platform(platform) "windows" ] == 1 } {
|
||||
if [ catch { load ./primitive_ref.dll primitive_ref} err_msg ] {
|
||||
puts stderr "Could not load dll:\n$err_msg"
|
||||
}
|
||||
} else {
|
||||
if [ catch { load ./primitive_ref.so primitive_ref} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
if [ catch { load ./primitive_ref[info sharedlibextension] primitive_ref} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
|
||||
if { [ref_int 3] != 3 } { puts stderr "ref_int failed" }
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
if { [ string match $tcl_platform(platform) "windows" ] == 1 } {
|
||||
if [ catch { load ./reference_global_vars.dll reference_global_vars} err_msg ] {
|
||||
puts stderr "Could not load dll:\n$err_msg"
|
||||
}
|
||||
} else {
|
||||
if [ catch { load ./reference_global_vars.so reference_global_vars} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
if [ catch { load ./reference_global_vars[info sharedlibextension] reference_global_vars} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
|
||||
# const class reference variable
|
||||
|
|
|
|||
|
|
@ -2,14 +2,8 @@
|
|||
# This is the union runtime testcase. It ensures that values within a
|
||||
# union embedded within a struct can be set and read correctly.
|
||||
|
||||
if { [ string match $tcl_platform(platform) "windows" ] == 1 } {
|
||||
if [ catch { load ./unions.dll unions} err_msg ] {
|
||||
puts stderr "Could not load dll:\n$err_msg"
|
||||
}
|
||||
} else {
|
||||
if [ catch { load ./unions.so unions} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
if [ catch { load ./unions[info sharedlibextension] unions} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
|
||||
# Create new instances of SmallStruct and BigStruct for later use
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue