[Python-3000] PyInt_ to PyLong_ rename

Gregory P. Smith greg at krypto.org
Sat Dec 8 20:03:54 CET 2007


heh ag

On 12/7/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>
> Gregory P. Smith wrote:
> > look at the length of a
> > hex pointer in the repr of a class for C pointer size.
>
> I don't think that will work, because the repr only uses
> as many hex digits as it needs to represent the value:
>
> >>> o = object()
> >>> o
> <object object at 0x533b8>
>
> I'm pretty sure my G4 PPC is using pointers longer than
> 20 bits. :-)


heh agreed, it clearly doesn't work everywhere.  I was hoping that all oses
had a high bit set in the virtual addresses they typically use for
processes.  I guess not. ;)

Anyways the struct module is the right answer as Thomas Heller already
pointed out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20071208/69024315/attachment.htm 


More information about the Python-3000 mailing list