[Cython] an issue with generated C API's

Stefan Behnel stefan_ml at behnel.de
Wed Jun 18 19:08:16 CEST 2008


Hi,

Lisandro Dalcin wrote:
> Currently, if one has something like this:
> 
> # mymod.pyx
> cdef public api class Foo [type PyFoo_Type, object PyFooObject]:
>     cdef int bar
> 
> The generated C header file contains this:
> 
> # mymod.h
> struct PyFooObject {
>   PyObject_HEAD
>   int bar;
> };
> 
> 
> Could the generated code be changed to say like this ??:
> 
> typedef struct PyFooObject {
>   PyObject_HEAD
>   int bar;
> } PyFooObject;

This patch works for me. It changes the declaration also in the .c files,
though. Any objections?

Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: typedef-structs.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
Url : http://codespeak.net/pipermail/cython-dev/attachments/20080618/9cc6840e/attachment-0001.bin 


More information about the Cython-dev mailing list