Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r69932:1f2c5fb9f1ad
Date: 2014-03-13 15:40 +0100
http://bitbucket.org/pypy/pypy/changeset/1f2c5fb9f1ad/
Log: Fix to match 321767c428c6 in the stmgc repo
diff --git a/rpython/translator/c/primitive.py
b/rpython/translator/c/primitive.py
--- a/rpython/translator/c/primitive.py
+++ b/rpython/translator/c/primitive.py
@@ -170,7 +170,12 @@
def name_address(value, db):
if value:
- return '((void *)%s)' % (db.get(value.ref(), static=True),)
+ res = db.get(value.ref(), static=True)
+ if res == db.get(value.ref(), static=False):
+ return res # common case
+ else:
+ # mess with stm address spaces
+ return '((void *)(long)%s)' % (res,)
else:
return 'NULL'
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit