Message188192
In different places, macros like SIZEOF_VOID_P or SIZEOF_LONG to choose a type, whereas the C language proposes standard types since ISO C99: intXX_t and uintXX_t (8, 16, 32, 64), intptr_t, etc.
Python should rely on these new types instead of trying to reimplement this standard. autotools provides missing types if needed. On Windows, stdint.h is supported in Microsoft Visual Studio 2010.
Attached patch reuses stdint.h types in different places. I only tested it on Linux Fedora 11.
sha3 module should also be modified.
I don't know if int64_t and uint64_t are always supported, nor if we can rely on them. Does Python support platform without 64-bit integer type?
The md5 module uses PY_LONG_LONG to get a 64-bit type. Does anyone know a platform where the md5 module is not compiled? |
|
Date |
User |
Action |
Args |
2013-04-30 22:52:46 | vstinner | set | recipients:
+ vstinner, mark.dickinson, Devin Jeanpierre |
2013-04-30 22:52:46 | vstinner | set | messageid: <1367362366.81.0.489465512002.issue17884@psf.upfronthosting.co.za> |
2013-04-30 22:52:46 | vstinner | link | issue17884 messages |
2013-04-30 22:52:46 | vstinner | create | |
|