[Pyrex] Wrapping structs that reference each other
Martijn Faassen
faassen at infrae.com
Mon Sep 27 14:51:20 CEST 2004
vng1 at mac.com wrote:
> How do I do forward declarations in Pyrex? I've got C structures that
> I'm trying to wrap, but they reference each other.
>
> The following code is an example of what I'd like to do, but Pyrex
> yells at me when it gets to the "_xmlNode root" in the first struct.
>
> cdef struct _xmlDoc:
> _xmlNode root
> cdef struct _xmlNode:
> _xmlDoc doc
This sounds suspiciously much like you're wrapping libxml2 with Pyrex,
is that correct? I've been working on something like that for quite a
while now, called lxml. Take a look here for the SVN archive, and drop
me a mail if you're interested in it:
http://codespeak.net/svn/lxml/trunk/src/lxml/
Regards,
Martijn
More information about the Pyrex
mailing list