From: Tim Peters Date: Wed, 2 Aug 2006 05:20:08 +0000 (+0000) Subject: _Stream.close(): Try to kill struct.pack() warnings when X-Git-Tag: v2.5b3~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a05f6e244a452a4a5ee647f6e1fc9ce01a13d696;p=python _Stream.close(): Try to kill struct.pack() warnings when writing the crc to file on the "PPC64 Debian trunk" buildbot when running test_tarfile. This is again a case where the native zlib crc is an unsigned 32-bit int, but the Python wrapper implicitly casts it to signed C long, so that "the sign bit looks different" on different platforms. --- diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 47bc8719c3..c185fbd49e 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -417,7 +417,13 @@ class _Stream: self.fileobj.write(self.buf) self.buf = "" if self.comptype == "gz": - self.fileobj.write(struct.pack("