1. Justin Peel
  2. pypy


Armin Rigo  committed efaa417

Fix a test.

  • Participants
  • Parent commits dc2cb75
  • Branches default

Comments (0)

Files changed (1)

File pypy/jit/metainterp/warmstate.py

View file
     # 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
             return 0
-        return lltype.cast_primitive(lltype.Signed, x)
+        return rffi.cast(lltype.Signed, x)
 def set_future_value(cpu, j, value, typecode):