[Python-Dev] Converting crc32 functions to use unsigned

Bob Ippolito bob at redivi.com
Tue May 30 19:37:04 CEST 2006


It seems that we should convert the crc32 functions in binascii,  
zlib, etc. to deal with unsigned integers. Currently it seems that 32- 
bit and 64-bit platforms are going to have different results for  
these functions.

Should we do the same as the struct module, and do DeprecationWarning  
when the input value is < 0? Do we have a PyArg_ParseTuple format  
code or a converter that would be suitable for this purpose?

None of the unit tests seem to exercise values where 32-bit and 64- 
bit platforms would have differing results, but that's easy enough to  
fix...

-bob




More information about the Python-Dev mailing list