prevent a warning from the struct module when data size >= 2**32.

This commit is contained in:
Gregory P. Smith 2008-03-23 23:45:12 +00:00
parent ac830e932d
commit dd10284516
1 changed files with 1 additions and 1 deletions

View File

@ -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