Author: Armin Rigo <[email protected]>
Branch: stmgc-c4
Changeset: r66805:9c83120fc819
Date: 2013-09-05 16:58 +0200
http://bitbucket.org/pypy/pypy/changeset/9c83120fc819/
Log: Fix for test_zll_stress_*.
diff --git a/rpython/rlib/rgc.py b/rpython/rlib/rgc.py
--- a/rpython/rlib/rgc.py
+++ b/rpython/rlib/rgc.py
@@ -403,7 +403,11 @@
if we_are_translated():
return lltype.cast_ptr_to_int(gcref)
else:
- return id(gcref._x)
+ from rpython.rtyper import annlowlevel
+ from rpython.rtyper.lltypesystem import llmemory, rffi
+ p = annlowlevel.cast_instance_to_base_ptr(gcref._x)
+ p = lltype.cast_opaque_ptr(llmemory.GCREF, p)
+ return rffi.cast(lltype.Signed, p)
def dump_rpy_heap(fd):
"NOT_RPYTHON"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit