On Oct 10, 5:24 am, Gordon Allott <[EMAIL PROTECTED]> wrote: > Hello :) > > The result of various incompatibilities has left me needing to somehow > extract the address that a null pointer is pointing to with the null > pointer being exposed to python via PyCObject_FromVoidPtr > > the code that creates the PyCObject is as follows: > tmp = PyCObject_FromVoidPtr (info.info.x11.display, NULL); > PyDict_SetItemString (dict, "display", tmp); > Py_DECREF (tmp); >
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