On Oct 10, 4:16 pm, Gordon Allott <[EMAIL PROTECTED]> wrote: > Aaron "Castironpi" Brady wrote: > > I see. If I understand, you have a PyCObject in a dictionary. > > > Look at the 'ctypes' module and try calling PyCObject_AsVoidPtr. Its > > return type should be 'c_void_p', and you can use 'result.value' to > > get the original pointer. > > -- > >http://mail.python.org/mailman/listinfo/python-list > > I have a hard time following that, if using ctypes you used PyDLL to > call PyCObject_AsVoidPtr on the PyCObject I already have surely it would > give me back a pointer (void for sake of simplicity) but it would be a > pointer to a new PyCObject and thus calling result.value on it would > only return the memory address of the new PyCObject? > -- > Gord Allott ([EMAIL PROTECTED]) > > signature.asc > < 1KViewDownload
Yes, well said. But no, not true, not necessarily. You can choose/ change return types with your code. If the call is defined already and you can't change the return, just define a new one that returns long. -- http://mail.python.org/mailman/listinfo/python-list