diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-03-23 23:45:12 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-03-23 23:45:12 (GMT) |
commit | dd10284516383276d50ae9b52bec4ab6562f888e (patch) | |
tree | 1269b57e79f09ad0e7cbb80e21d0b08c0290d600 | |
parent | ac830e932df1fdbdbc1ba928a27db1d321a23fcd (diff) | |
download | cpython-dd10284516383276d50ae9b52bec4ab6562f888e.zip cpython-dd10284516383276d50ae9b52bec4ab6562f888e.tar.gz cpython-dd10284516383276d50ae9b52bec4ab6562f888e.tar.bz2 |
prevent a warning from the struct module when data size >= 2**32.
-rw-r--r-- | Lib/gzip.py | 2 |
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 |