extracting null pointer address from PyCObject with ctypes

Gordon Allott gordallott at gmail.com
Fri Oct 10 13:04:09 EDT 2008


Aaron "Castironpi" Brady wrote:
> Did you try:
> 
> tmp= PyLong_FromLong( ( long ) info.info.x11.display );
> PyDict_SetItemString (dict, "display", tmp);
> Py_DECREF (tmp);
> 
> Or also try:
> 
> PyCObject_AsVoidPtr( tmp );
> --
> http://mail.python.org/mailman/listinfo/python-list

the problem is that I can't edit the C code - well I can and might
submit a patch to the project but I also need a solution that works from
the python side of things.


-- 
Gord Allott (gordallott at gmail.com)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20081010/95bd1584/attachment-0001.sig>


More information about the Python-list mailing list