#836 Bug in swig runtime/type query system/code generation

open
None
5
2007-06-12
2007-06-12
nitro
No

For a thorough explanation see here:

http://thread.gmane.org/gmane.comp.programming.swig/10089/focus=10098

-Matthias

Discussion

  • John Lenz

    John Lenz - 2007-06-12
    • assigned_to: nobody --> wuzzeb
     
  • Olly Betts

    Olly Betts - 2007-09-18

    Logged In: YES
    user_id=14972
    Originator: NO

    Was this bug fixed by this recent change?

    09/05/2007: wuzzeb (John Lenz)
    - Change r_ltype in typesys.c to store a hashtable instead of a single value.
    several very subtle bugs were being caused by multiple ltypes being mapped
    to a single mangled type, mostly when using typedefed template parameters.
    Now, r_ltype stores a hashtable of possible ltypes, and when generating the
    type table, all the ltypes are added into the swig_type_info structure.

     
  • nitro

    nitro - 2007-09-18

    Logged In: YES
    user_id=788099
    Originator: YES

    I can't tell. I'm on a windows machine without all the cygwin/MinGW machinery so I can't check-out SVN and recompile SWIG to test. However if the test code in the link mentioned above works, the problem is probably gone. If you are on the newest SWIG version I'd by happy to put the testcase into a zip file and send it to you.

     
  • Olly Betts

    Olly Betts - 2007-09-18

    Logged In: YES
    user_id=14972
    Originator: NO

    I just tried the "main1.i" example from the first message in the gmane thread and get an essentially identical main1_wrap.cxx generated with 1.3.31 and SVN HEAD - in particular, this line is unchanged:

    static swig_type_info _swigt__p_YYY = {"_p_YYY", 0, 0, 0, 0, 0};

    So I don't think this is fixed.

    If that testcase isn't suitable, feel free to attach a better one to this bug.

     
  • nitro

    nitro - 2007-09-19

    Logged In: YES
    user_id=788099
    Originator: YES

    Seems like it is not fixed. The testcase is suitable and causes problems in practice. So the reason of this bug is a different one than the one before.
    Here I mention a workaround to the problem, but I guess it is not the fix: http://article.gmane.org/gmane.comp.programming.swig/10091 .

    Thanks for your efforts!

    -Matthias

     
  • John Lenz

    John Lenz - 2007-09-19

    Logged In: YES
    user_id=153408
    Originator: NO

    Ok, I'll take another look at it

     
  • John Lenz

    John Lenz - 2007-10-12

    Logged In: YES
    user_id=153408
    Originator: NO

    Ok, I committed (in r9981) a entry for the test suite. It passes with the latest CVS, and I didn't need to change anything... so you should test again, and if it still doesn't work try modifying Examples/test-suite/multi_import_a.i and so on to get the test suite to fail.

    Note, _swigt__p_YYY should be empty, because the dependencies are stored the other way around... _p_XXX has entries for both YYY and ZZZ

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks