Commit ff44ee8f authored by Jeremy Hylton's avatar Jeremy Hylton

Revert previous checkin; caused massive test failures.

parent d7e74949
...@@ -89,29 +89,26 @@ t32 = 1L << 32 ...@@ -89,29 +89,26 @@ t32 = 1L << 32
def p64(v, pack=struct.pack): def p64(v, pack=struct.pack):
"""Pack an integer or long into a 8-byte string""" """Pack an integer or long into a 8-byte string"""
if v < t32: if v < t32: h=0
h = 0
else: else:
h, v = divmod(v, t32) h=v/t32
v=v%t32
return pack(">II", h, v) return pack(">II", h, v)
def u64(v, unpack=struct.unpack): def u64(v, unpack=struct.unpack):
"""Unpack an 8-byte string into a 64-bit (or long) integer""" """Unpack an 8-byte string into a 64-bit (or long) integer"""
# XXX this seems to be just a slower version of U64()
h, v = unpack(">ii", v) h, v = unpack(">ii", v)
if v < 0: if v < 0: v=t32+v
v = t32 + v
if h: if h:
if h < 0: if h < 0: h=t32+h
h = t32 + h v=h*t32+v
v = (h << 32) + v
return v return v
def U64(v, unpack=struct.unpack): def U64(v, unpack=struct.unpack):
"""Same as u64 but always returns a long.""" """Same as u64 but always returns a long."""
h, v = unpack(">II", v) h, v = unpack(">II", v)
if h: if h:
v = (h << 32) + v v=h*t32+v
return v return v
def cp(f1, f2, l): def cp(f1, f2, l):
...@@ -132,7 +129,6 @@ def newTimeStamp(old=None, ...@@ -132,7 +129,6 @@ def newTimeStamp(old=None,
time=time.time, gmtime=time.gmtime): time=time.time, gmtime=time.gmtime):
t=time() t=time()
ts=TimeStamp(gmtime(t)[:5]+(t%60,)) ts=TimeStamp(gmtime(t)[:5]+(t%60,))
if old is not None: if old is not None: return ts.laterThan(than)
return ts.laterThan(old)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment