[Cython] Opaque Pointers in Wrapping a C API
Stefan Behnel
stefan_ml at behnel.de
Wed Jul 30 14:56:25 CEST 2008
Nicole King schrieb:
> Please forgive me if this is an old question. I have been unable to make
> any progress on this despite Google.
>
> I have a small program:
>
> cdef extern from *:
> ctypedef struct opaque_pointer:
> pass
> opaque_pointer* init(char *tablename)
> void finish(opaque_pointer** h)
>
> cdef class a_class:
> cdef opaque_pointer* the_handle
> def __init__(table_name):
> the_handle = init(table_name)
This should read: self.the_handle = ...
Stefan
More information about the Cython-dev
mailing list