This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Oren Milman, mark.dickinson, serhiy.storchaka
Date 2017-03-25.16:21:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490458909.81.0.934521532523.issue29720@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think there is a bug. There are several ways to get the integer representation of the pointer. PyLong_FromVoidPtr() is the most straightforward. From Python side id() uses it. printf("%p") is a way of getting string representation of the pointer, that string can be converted to integer. This way is used in object.__repr__(). Usually %p formats the pointer as hexadecimal, but the sign is not defined. Therefore when the pointer is converted to the integer it can be interpreted as either signed or unsigned integer. PyLong_AsVoidPtr() should accept both representations.
History
Date User Action Args
2017-03-25 16:21:49serhiy.storchakasetrecipients: + serhiy.storchaka, mark.dickinson, Oren Milman
2017-03-25 16:21:49serhiy.storchakasetmessageid: <1490458909.81.0.934521532523.issue29720@psf.upfronthosting.co.za>
2017-03-25 16:21:49serhiy.storchakalinkissue29720 messages
2017-03-25 16:21:49serhiy.storchakacreate