Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1077 constructing vectors from lists of imported pointer types

closed-fixed
5
2011-02-15
2010-02-25
onko
No

Hi,

see attached test case. Run ./make.sh. When making using the std::vector template to wrap a non-fundamental data type defined in a different compilation unit, SWIG 1.3.40 fails to construct from a list (constructor does not seem to be available), while SWIG 1.3.36 handles it just fine. The failure message is:

$ ./make.sh
Traceback (most recent call last):
File "./fail.py", line 5, in <module>
TestVector([a,b])
File "..../swig-bug2/test.py", line 129, in __init__
this = _test.new_TestVector(*args)
TypeError: in method 'new_TestVector', argument 1 of type 'std::vector< Test * > const &'

No output for 1.3.36. System is Debian. Tested debian packages 1.3.40-2, 1.3.36-1.

Discussion

  • onko
    onko
    2010-02-25

    Reduced test case

     
  • William Fulton
    William Fulton
    2011-02-15

    This was fixed by better typedef resolution when getting the mangled type for the type system. See svn commit rev 12264 and CHANGES file notes in rev 12463 for swig-2.0.2.

     
  • William Fulton
    William Fulton
    2011-02-15

    • assigned_to: nobody --> wsfulton
    • labels: 102864 --> code generation (general)
    • status: open --> closed-fixed