[Pyrex] newby guidance
Greg Ewing
greg at cosc.canterbury.ac.nz
Thu Jun 26 04:07:16 CEST 2003
Robin Becker <robin at reportlab.com>:
> Can I make use of pyrex to create my struct and pass it around to C code
> without defining the struct again in pyrex?
It depends on what you want to do with the struct. If
you can get away with treating it as a completely
opaque struct in Pyrex, then all you need is
cdef extern from "myheader.h":
struct MyStruct
But if Pyrex code needs to access any of its members, you
will need to provide Pyrex declarations for at least
those members.
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