[Pyrex] wrapping structs containing pointers and functions that allocate memory to a pointer

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Jun 14 04:13:42 CEST 2005


Nathaniel Haggard wrote:

> struct alpha {
>     char *name;
>     alpha *next;
>     void *otherptr
> }
> 

> How should I wrap this struct?  How should I wrap functions that
> return pointers and modify pointers to this struct?

There is no single answer to this question. It depends
on a lot of details about how these structs are used
and how memory for them is managed. I'll need more
information before I can help you much.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+



More information about the Pyrex mailing list