[Pyrex] Wrapping "typedef struct _A A;"

Greg Ewing greg at cosc.canterbury.ac.nz
Thu Jun 5 01:57:07 CEST 2003


Edward C. Jones wrote:

> How do I treat the following typedefs in Pyrex?
>
> typedef struct _IplTileInfo IplTileInfo;

Greg Ewing wrote:

> ctypedef struct IplTileInfo

Edward C. Jones wrote:

> I am not sure that "ctypedef struct IplTileInfo" is correct. Is the
> following better?
>
> cdef struct _IplTileInfo
> ctypedef _IplTileInfo IplTileInfo

Only if "ctypedef struct IplTileInfo" doesn't work for some
reason. As long as you're including the real definition from
a .h file with "cdef extern from", it probably won't matter
which form you use.

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