Menu

#1213 Bad TCL input typemap for const std::vector& or *

None
closed-duplicate
nobody
tcl (60)
5
2022-02-09
2011-12-13
Zvi Tarem
No

The generic input typemap for const std::vector& or const std::vector* in TCL is wrong: it checks for converting the argument using $&1_descriptor instead of $1_descriptor, which implies that the caller needs to provide an std::vector** - impossible from TCL. Removing the ampersand fixes the problem, and then you can use a const std::vector& returned from a wrapped function, and call clear, size, get, set, etc. on it.

It seems that this bus has been in SWIG at least since 1.3.19, maybe earlier, and it is still present in 2.0.4.
in swigwin-2.0.4, the problem is in line 121 of ...\tcl\std_vector.i.

Discussion

  • Olly Betts

    Olly Betts - 2022-02-09
    • status: open --> closed-duplicate
    • Group: -->
     
  • Olly Betts

    Olly Betts - 2022-02-09

    Duplicate of #1207.

     
  • Olly Betts

    Olly Betts - 2022-02-09

    Fixed in git master by b415f566a0851d9c63bf8b02079539bf92d23027, should be in the upcoming SWIG 4.1.0 release.

     

Log in to post a comment.

Monday.com Logo