
Nov. 22, 2010
7:12 p.m.
Am 23.11.2010 00:48, schrieb Jesus Cea:
I think this is probably trivial, but is there any foolproof way to detect 64 bit builds in python, beside "sys.maxint"?.
The canonical way is to use platform.architecture().
And any macro useable for conditional compilation in C?.
You need to be more specific than that. There are perhaps ten independent properties you may query, depending on what precise problem you try to solve. Most likely, you are looking for SIZEOF_VOID_P (but don't use that unless you literally want to know how many bytes a pointer uses, or whether it uses 4 or 8 bytes). Regards, Martin