From: Thomas L. <tho...@la...> - 2005-12-15 11:28:38
|
Dear list, I am trying tu use std_vector.i to wrap vector in tcl. While wrapping for example a std::vector<int> is working quite well, this simple test code does not work as expected, some methods are working, some others not: ============test.i================ %include "std_vector.i" %inline { struct Pipo { int i; }; } typedef std::vector<Pipo> PipoVector; %template(PipoVector) std::vector<Pipo>; ============================== in my tcl shell: % set v [test::new_PipoVector ] _28212a08_p_std__vectorTPipo_p_t % $v size list of Pipo * expected while evaluating {$v size} % sift::PipoVector_size $v list of Pipo * expected while evaluating {sift::PipoVector_size $v} % $v empty list of Pipo expected while evaluating {$v empty} % $v push [sift::new_Pipo] # WORKING ! % $v get 0 # WORKING ! _983a3708_p_Pipo % $v pop # WORKING ! _a83b3708_p_Pipo I am using swig 1.3.25 and gcc (GCC) 4.0.3 20051201 (prerelease) (Debian) 4.0.2-5). Any ideas on what's going on ? -- thomas |