From: Gregory P. Smith Date: Sun, 23 Mar 2008 23:45:12 +0000 (+0000) Subject: prevent a warning from the struct module when data size >= 2**32. X-Git-Tag: v2.6a2~142 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd10284516383276d50ae9b52bec4ab6562f888e;p=python prevent a warning from the struct module when data size >= 2**32. --- diff --git a/Lib/gzip.py b/Lib/gzip.py index 2246c9d6ef..eeef3f8b90 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