Mmm, not sure if that is completelly OK. The generated code says
typedef struct PyFooObject {
PyObject_HEAD
int bar;
};
but I would expect (note the final 'PyFooObject')
typedef struct PyFooObject {
PyObject_HEAD
int bar;
} PyFooObject;
With your patch, GCC generates this warning :
apitest.c:182: warning: useless storage class specifier in empty declaration
On 6/18/08, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> 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
>
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
>
>
--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev