Menu

#1207 Non-working std::vectors (Tcl)

None
closed-fixed
nobody
tcl (60)
5
2022-02-09
2011-11-21
No

Hi all,

The wrappers generated for std::vector are wrong, as only a few methods work (size, empty do not work, but clear, push, pop, get, set work ok).
Also, pushing std::vectors does not work also!

I think that at least a change is needed in tcl/std_vector.i, line 121, where:

if(SWIG_ConvertPtr($input, (void **) &v, \
$&1_descriptor, 0) == 0) {

must be changed to:

if(SWIG_ConvertPtr($input, (void **) &v, \
$1_descriptor, 0) == 0) {

(Ampersand removed from 1_descriptor).

Changing this in my local copy of swig 2.0.4, restores the missing std::vector functionality.
But I am not sure if this is the correct solution, or this is the only change needed.

Can someone look at this?

Discussion

  • Georgios Petasis

    • summary: Non-working std::vectors --> Non-working std::vectors (Tcl)
     
  • Olly Betts

    Olly Betts - 2022-02-09

    Closed #1213 as a duplicate of this.

     
  • Olly Betts

    Olly Betts - 2022-02-09
    • status: open --> closed-fixed
    • Group: -->
     
  • 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.

MongoDB Logo MongoDB