This is sort of a separate issue than these others....

I have spent a good amount of time hand wrapping C++ classes using
cython.  The big thing that you quickly run into is the difficulty in
handling inheritance.  More specifically, you would like your c++
class hierarchy to be reflected and mirrored in the Cython class
hierarchy.

Have you looked into these issues yet?  It has been a few months, so
my mind is not fresh on this stuff, but it was quite subtle and I
don't think I ever got to a point of having a solution that we really
satisfactory.  What I do remember:

* There were problems getting superclass methods in Python callable by
sub classes because the pointer types were different.

* Performing dynamic memory allocations, etc. in __cinit__ is
difficult because subclasses might need to do this differently.  For
example a subclass would want to hold a pointer to the C++ subclass,
not a pointer to the subclass.  The calling conventions of __cinit__
in Cython make this really tough to handle this.

I am curious if you or others have made progress in figuring this stuff out?

Cheers,

Brian
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to