[Tcl] Fix Tcl generic input typemap for std::vector

Fixes https://sourceforge.net/p/swig/bugs/1207/
Fixes https://sourceforge.net/p/swig/bugs/1213/
This commit is contained in:
Olly Betts 2022-02-10 09:55:58 +13:00
commit bb15c4eccf
3 changed files with 15 additions and 1 deletions

View file

@ -5,3 +5,11 @@ if [ catch { load ./li_std_vector[info sharedlibextension] li_std_vector} err_ms
# Regression test for bug fixed in SWIG 4.1.0.
if {[sum []] != 0} { error "bad vector sum" }
IntPtrVector v 6
if {[v empty] != 0} { error "bad std::vector::empty()" }
if {[v size] != 6} { error "bad std::vector::size()" }
# Test that calling get succeeds
v get 0
v pop
if {[v size] != 5} { error "bad std::vector::size()" }