[Pyrex] opaque types and pyrex
Mattias Holm
mattias.holm at contra.nu
Wed Aug 13 21:42:47 CEST 2008
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
More information about the Pyrex
mailing list