[Pyrex] Wrapping structs that reference each other

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Sep 27 04:43:03 CEST 2004


"vng1 at mac.com" <vng1 at mac.com>:

> How do I do forward declarations in Pyrex?
> 
>            cdef struct _xmlDoc:
>                _xmlNode root
>            cdef struct _xmlNode:
>                _xmlDoc doc

Like this:

  cdef struct _xmlNode   # Forward declaration of xmlNode

  cdef struct _xmlDoc:
    _xmlNode root

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