[Pyrex] Function Pointer

Marco Bubke marco at bubke.de
Sat Mar 6 20:03:52 CET 2004


On Saturday 06 March 2004 11:27, Jiba wrote:
> On Fri, 05 Mar 2004 14:47:24 +1300 (NZDT)
>
> Greg Ewing <greg at cosc.canterbury.ac.nz> wrote:
> > Ok, the prototype is tesselator_vertex(void* vertex, void* tesselator)
> > but I thought that it shloud be possible to pass python objects.
> >
> > It should be, but it's a bit tricky casting between Python
> > objects and other pointer types, since it's not always
> > obvious what Pyrex will do with the refcounts.
>
> I use GLU tesselator callbacks with Python object without problem (but i
> don't use "object" but a specific cdef'ed class ("MyCdefClass")).
>
> I define the tesselator structure as following :
>
> ctypedef struct GLUtesselator:
>   int _dummy
>

Yes, I have tried all this kind of declarations. The function pointer a ok. I 
can call them. Can I send You the code so that you can test for you self. Its 
like a big black wall. I have no felling there the problem could be.

Marco 





More information about the Pyrex mailing list