summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-03-23 23:45:12 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2008-03-23 23:45:12 (GMT)
commitdd10284516383276d50ae9b52bec4ab6562f888e (patch)
tree1269b57e79f09ad0e7cbb80e21d0b08c0290d600 /Lib
parentac830e932df1fdbdbc1ba928a27db1d321a23fcd (diff)
downloadcpython-dd10284516383276d50ae9b52bec4ab6562f888e.zip
cpython-dd10284516383276d50ae9b52bec4ab6562f888e.tar.gz
cpython-dd10284516383276d50ae9b52bec4ab6562f888e.tar.bz2
prevent a warning from the struct module when data size >= 2**32.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/gzip.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py
index 2246c9d..eeef3f8 100644
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -310,7 +310,7 @@ class GzipFile:
self.fileobj.write(self.compress.flush())
write32u(self.fileobj, self.crc)
# self.size may exceed 2GB, or even 4GB
- write32u(self.fileobj, self.size)
+ write32u(self.fileobj, self.size & 0xffffffffL)
self.fileobj = None
elif self.mode == READ:
self.fileobj = None