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.)
A patch for swig/dnet.i
New file swig/addr.i, included by swig/dnet.i
Logged In: YES
user_id=18578
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
satisfied.
i had used SWIG thinking that multiple language bindings would be easier to
maintain from a single interface file. i was wrong.