opaque types and pyrex

Mattias Holm <[email protected]> Wed, 13 Aug 2008 20:42:47 +0100
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
I am trying to wrap a couple of functions returning pointers to  
opaque / extern types:

cdef extern from "physics/orbit.h":
     ctypedef struct orb_sys_t
     ctypedef struct orb_obj_t
     orb_sys_t* orbit_add_sys(orb_sys_t *parent,  char *name, float  
radius, float w0)
     orb_obj_t* orbit_add_obj(orb_sys_t *sys,  char *name, float  
radius, float w0, float m)


def addOrbitalSys(name, radius, w0):
     return orbit_add_sys(NULL, name, radius, w0)

def addOrbitalSysWithParent(parent, name, radius, w0):
     return orbit_add_sys(parent, name, radius, w0)


Then I get the error message: Cannot convert 'orb_sys_t *' to Python  
object

Is there a good way to get around it?


/ Mattias