Good method for storing C pointer?

Tom Holroyd tomh at po.crl.go.jp
Tue Mar 7 22:22:25 EST 2000


On Sun, 5 Mar 2000, Grant Munsey wrote:

> Anyone have a clean way to do this?

You could check out the way that SWIG does it.  That is, each pointer is
encoded as a string, like '_1203e5b40_Type_p' where the number is the
actual pointer value in hex and the Type is the pointer's type, like
"char".  SWIG comes with routines for manipulating points of this type
(incrementing, allocating, freeing, dereferencing, etc.).




More information about the Python-list mailing list