[Pyrex] Re: ctypedef problem and improvement

Greg Ewing greg at cosc.canterbury.ac.nz
Wed May 26 03:34:00 CEST 2004


Mitch Chapman <mitchchapman at earthlink.net>:

> cdef extern from "some_header.h":
>      ctypedef struct MyStruct:
>          pass
> 
> /Users/mitchchapman/test.pyx:3:8: Syntax error in C variable declaration

I thought I had fixed that, but it seems I haven't.
I'll put it on my list.

In the meantime, it looks like you'll have to put
a dummy member in the struct, e.g.

  cdef extern from "some_header.h":
    ctypedef struct MyStruct:
      int I_hope_Greg_fixes_this_soon

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+




More information about the Pyrex mailing list