[Pyrex] c++class constructor wrapper error

Greg Ewing greg.ewing at canterbury.ac.nz
Sun May 6 00:00:22 UTC 2007


yang yang wrote:

> 10 cdef extern from "core.h":
> 11	ctypedef struct CUDT:
> 12		CUDT *CUDT_factory "new CUDT" ()
> 13		void *delete "delete" (void *o)

You don't want these functions to be members of the
CUDT struct. Just declare them as stand-alone functions,
i.e.

cdef extern from "core.h":

     ctypedef struct CUDT:
         ...

     CUDT *CUDT_factory "new CUDT" ()
     void *delete "delete" (void *o)

--
Greg



More information about the Pyrex mailing list