[pypy-commit] pypy dynamic-specialized-tuple: fix
alex_gaynor
noreply at buildbot.pypy.org
Tue Mar 13 19:36:08 CET 2012
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: dynamic-specialized-tuple
Changeset: r53461:5af129a2e3be
Date: 2012-03-13 11:35 -0700
http://bitbucket.org/pypy/pypy/changeset/5af129a2e3be/
Log: fix
diff --git a/pypy/objspace/std/tupleobject.py b/pypy/objspace/std/tupleobject.py
--- a/pypy/objspace/std/tupleobject.py
+++ b/pypy/objspace/std/tupleobject.py
@@ -157,13 +157,10 @@
repr += ")"
return space.wrap(repr)
-def hash__Tuple(space, w_tuple):
- return space.wrap(hash_tuple(space, w_tuple.wrappeditems))
-
@jit.look_inside_iff(lambda space, w_tuple:
jit.isconstant(w_tuple.length()) and
w_tuple.length() < UNROLL_TUPLE_LIMIT)
-def hash_tuple(space, w_tuple):
+def hash__Tuple(space, w_tuple):
# this is the CPython 2.4 algorithm (changed from 2.3)
mult = 1000003
x = 0x345678
@@ -174,7 +171,7 @@
z -= 1
mult += 82520 + z + z
x += 97531
- return intmask(x)
+ return space.wrap(intmask(x))
def getnewargs__Tuple(space, w_tuple):
return space.newtuple([space.newtuple(w_tuple.tolist(space))])
More information about the pypy-commit
mailing list