[Pyrex] wrapping structs containing pointers and functions that
allocate memory to a pointer
Nathaniel Haggard
natester at gmail.com
Mon Jun 13 17:58:17 CEST 2005
void add_arg(alpha *args) is the function to wrap.
struct alpha {
char *name;
alpha *next;
void *otherptr
}
add_arg allocates memory and assigns args to point to it.
In making the extension class pyrexc gives errors about not being able
to convert Python object to alpha (*) and the same error for void (*).
Evidently this is not the way,
def setnext(self, next):
self.next = next
How should I wrap this struct? How should I wrap functions that
return pointers and modify pointers to this struct?
More information about the Pyrex
mailing list