#2 Improvements to the Python support

Wim Lewis

I ended up making sizable changes to the "addr" implementation (and
addr_iter with it). The rest of the SWIG file is pretty much the same,
except for the places where it references struct addrs.

The main change is that instead of using the SWIG_pointer
mechanism and a shadow class, 'addr' is actually a native Python
class, and the typemaps translate between the native class and the
struct when needed. This works very well for my purposes. (I also
think it's simpler.) I tried to retain all the behaviors of the old
implementation but I may have missed something.

There are two files here: a patch for dnet.i, and a new file addr.i
(which I split into its own file for my own convenience; there's no
reason it couldn't be inlined again.)


  • Wim Lewis

    Wim Lewis - 2003-08-01

    A patch for swig/dnet.i

  • Wim Lewis

    Wim Lewis - 2003-08-01

    New file swig/addr.i, included by swig/dnet.i

  • Dug Song

    Dug Song - 2004-01-26

    Logged In: YES

    thank you for the diff. the Python support has been entirely reimplemented
    using Pyrex in lieu of SWIG, so hopefully the intent of this diff has been

    i had used SWIG thinking that multiple language bindings would be easier to
    maintain from a single interface file. i was wrong.

  • Dug Song

    Dug Song - 2004-01-26
    • status: open --> closed-fixed

Log in to post a comment.

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

Sign up for the SourceForge newsletter:

No, thanks