[Pyrex] pyrexembed: How to make a method which returns a struct

Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 23 02:37:24 CEST 2006


Martin Dobiasch wrote:
>>Use "cdef RoomConnections getRoomConnections(..."
>>
>>Or look through the mail archives of this list to find other ways of doing the
>>thing you might be trying to do here.
> 
> If I use cdef the function is not in the class.

Yes, it is, but you won't be able to call it from
Python code.

If the method must be callable from Python, you will
need to wrap the structure in a Python object somehow,
such as using another extension type.

--
Greg



More information about the Pyrex mailing list