[Pyrex] Structure wrapping issue
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Nov 15 05:08:00 CET 2004
Jergosh Slodkovic wrote:
> Fragment of the original header (libgadu.h):
>
> struct gg_login_params {
> Code of my padu.pyx:
>
> cdef extern from "libgadu.h":
> ctypedef struct gg_login_params:
These don't match. You want
cdef extern from "libgadu.h":
struct gg_login_params:
i.e. no 'ctypedef', since the original declaration
doesn't use typedef.
> Apart from that, after importing the module into Python and creating an
> instance of login_params class, attributes from gg_login_params aren't
> accessible. Am I doing something wrong?
There's currently no direct way of exposing these
to Python code. You can get the same effect using a
property with suitable accessor methods.
--
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