[Pyrex] Passing c pointers to a class method

John (J5) Palmieri johnp at redhat.com
Tue May 4 20:38:42 CEST 2004


Hello all,

How come something like this works:

cdef test (void *ptr):
   pass

test (somepointer)

Yet this spits out "Cannot convert 'void (*)' to Python object":

cdef class testclass:
    cdef test (self, void *ptr):
        pass

mytest=testclass()
mytest.test(somepointer)


-- 
John (J5) Palmieri
Associate Software Engineer
Desktop Group
Red Hat, Inc.
Blog: http://martianrock.com





More information about the Pyrex mailing list