[Cython] an issue with generated C API's

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jun 21 02:14:55 CEST 2008


Lisandro Dalcin wrote:

> Could the generated code be changed to say like this ??:
> 
> typedef struct PyFooObject {
>   PyObject_HEAD
>   int bar;
> } PyFooObject;

You should be able to get that already by using 'ctypedef'
instead of 'cdef', i.e.

ctypedef public api class Foo [type PyFoo_Type, object PyFooObject]:
   ...

-- 
Greg


More information about the Cython-dev mailing list