[Python-checkins] cpython: Remove dead code in gzip.

nadeem.vawda python-checkins at python.org
Wed Apr 13 19:11:10 CEST 2011


http://hg.python.org/cpython/rev/9bc342724319
changeset:   69326:9bc342724319
user:        Nadeem Vawda <nadeem.vawda at gmail.com>
date:        Wed Apr 13 18:57:40 2011 +0200
summary:
  Remove dead code in gzip.

These functions appear to be holdovers from the 2.x code, intended to handle
problems with CRC signedness.

files:
  Lib/gzip.py |  12 ------------
  1 files changed, 0 insertions(+), 12 deletions(-)


diff --git a/Lib/gzip.py b/Lib/gzip.py
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -16,18 +16,6 @@
 
 READ, WRITE = 1, 2
 
-def U32(i):
-    """Return i as an unsigned integer, assuming it fits in 32 bits.
-    If it's >= 2GB when viewed as a 32-bit unsigned int, return a long.
-    """
-    if i < 0:
-        i += 1 << 32
-    return i
-
-def LOWU32(i):
-    """Return the low-order 32 bits, as a non-negative int"""
-    return i & 0xFFFFFFFF
-
 def write32u(output, value):
     # The L format writes the bit pattern correctly whether signed
     # or unsigned.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list