Author: Armin Rigo <[email protected]>
Branch:
Changeset: r46949:efaa417ebadc
Date: 2011-08-31 17:19 +0200
http://bitbucket.org/pypy/pypy/changeset/efaa417ebadc/
Log: Fix a test.
diff --git a/pypy/jit/metainterp/warmstate.py b/pypy/jit/metainterp/warmstate.py
--- a/pypy/jit/metainterp/warmstate.py
+++ b/pypy/jit/metainterp/warmstate.py
@@ -124,7 +124,7 @@
# Hash of lltype or ootype object.
# Only supports strings, unicodes and regular instances,
# as well as primitives that can meaningfully be cast to Signed.
- if isinstance(TYPE, lltype.Ptr):
+ if isinstance(TYPE, lltype.Ptr) and TYPE.TO._gckind == 'gc':
if TYPE.TO is rstr.STR or TYPE.TO is rstr.UNICODE:
return rstr.LLHelpers.ll_strhash(x) # assumed not null
else:
@@ -140,7 +140,7 @@
else:
return 0
else:
- return lltype.cast_primitive(lltype.Signed, x)
+ return rffi.cast(lltype.Signed, x)
@specialize.ll_and_arg(3)
def set_future_value(cpu, j, value, typecode):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit