[Cython] Syntax to declare a c++ class?
Stefan Behnel
stefan_ml at behnel.de
Thu May 7 10:39:02 CEST 2009
Dag Sverre Seljebotn wrote:
> Allocation would happen through an actual (as light-weight as
> possible, and probably mostly opaque, perhaps doing as much as printing
> the C++ name of the class in its repr) Python object
That wouldn't work, though. Imagine you'd return the C++ object pointer
from a function. What would happen to the Python object that holds it? How
would you keep the ref-counting context for it?
If we enable ref-counting for C++ objects, we should do it ourselves,
rather than relying on Python object creation. Not sure if that is doable
at all, but Python objects simply don't work here.
Stefan
More information about the Cython-dev
mailing list