SWIG Python Extension winth C++ Problematic

skip at pobox.com skip at pobox.com
Fri Aug 4 09:52:05 EDT 2006


    >> I have been working getting my C++ code to be used in Python (
    >> Basically Extending ) This is the problem i am facing rite now.
    >> 
    >> I have a function that returns a Pointer to a class in my C++ Code
    >> 
    >> It looks like this
    ...
    >> I have used SWIG to get the Glue code.
    >> 
    >> When i call this function ( in python ) and it eventually returns (
    >> when it gets a connection in this case ) it crashes ! I get a SEG
    >> FAULT !
    >> 
    >> Is it some thing that cannot be done ?

I'm certainly no SWIG expert, however:

    1. Is your SLSocket class wrapped with SWIG?  Do you maybe need a
       typemap?  Can you explicitly create one from Python?  If so, does
       that work?

    2. What does your SWIG .i file look like?

    3. Finally, have you tried asking on the SWIG mailing list
       (swig-user at lists.sourceforge.net)?  There are probably many more SWIG
       experts there than here.

Skip



More information about the Python-list mailing list