I think i'm starting to wrap my head around all of this, but I have a
question about expose a C data type to python.

I'm interfacing with the OpenCV library whose fundamental data structure is
an IplImage. Most of the functional code passes around pointers to these
types and can do this in cython with no problem. I hit the wall when I try
to get my final result back into python. I have been trying to just pass the
pointer back which obviously wont work. Now, I am thinking the right way to
go about it is to write an extension type that interfacing with the
structure on the C level.

i.e. something like:

cdef class IplImage:
      cdef IplImage* img

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

Reply via email to