Staging
v0.5.1
https://github.com/python/cpython
Revision 62decc9f4966c060a3d4bcf762d8940d666496c5 authored by Tim Peters on 02 August 2006, 04:12:36 UTC, committed by Tim Peters on 02 August 2006, 04:12:36 UTC
buildbot (& possibly other 64-bit boxes) during test_gzip.

The native zlib crc32 function returns an unsigned 32-bit integer,
which the Python wrapper implicitly casts to C long.  Therefore the
same crc can "look negative" on a 32-bit box but "look positive" on
a 64-bit box.  This patch papers over that platform difference when
writing the crc to file.

It may be better to change the Python wrapper, either to make
the result "look positive" on all platforms (which means it may
have to return a Python long at times on a 32-bit box), or to
keep the sign the same across boxes.  But that would be a visible
change in what users see, while the current hack changes no
visible behavior (well, apart from stopping the struct deprecation
warning).

Note that the module-level write32() function is no longer used.
1 parent 4edcba6
History
Tip revision: 62decc9f4966c060a3d4bcf762d8940d666496c5 authored by Tim Peters on 02 August 2006, 04:12:36 UTC
Try to squash struct.pack warnings on the "amd64 gentoo trunk"
Tip revision: 62decc9
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
PCbuild8
Parser
Python
RISCOS
Tools
.hgtags -rw-r--r-- 3.1 KB
LICENSE -rw-r--r-- 13.2 KB
Makefile.pre.in -rw-r--r-- 34.2 KB
README -rw-r--r-- 53.5 KB
configure -rwxr-xr-x 623.0 KB
configure.in -rw-r--r-- 94.0 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 26.4 KB
setup.py -rw-r--r-- 65.4 KB

README

back to top