swig/Examples/test-suite/tcl/li_std_vector_runme.tcl
Olly Betts 6f4adde4b4 [Tcl] Fix std_vector typecheck typemaps
In some cases the typecheck typemap would try to access the first
element of an empty Tcl list.

Fixes https://sourceforge.net/p/swig/bugs/1309/
2022-02-01 13:09:00 +13:00

7 lines
240 B
Tcl

if [ catch { load ./li_std_vector[info sharedlibextension] li_std_vector} err_msg ] {
puts stderr "Could not load shared object:\n$err_msg"
}
# # Regression test for bug fixed in SWIG 4.2.0.
if {[sum []] != 0} { error "bad vector sum" }