Author: Armin Rigo <[email protected]>
Branch:
Changeset: r89773:93614a596712
Date: 2017-01-25 21:42 +0100
http://bitbucket.org/pypy/pypy/changeset/93614a596712/
Log: Fix (obscure reason, can be reproduced with "py.test rtyper/")
diff --git a/rpython/rtyper/lltypesystem/rffi.py
b/rpython/rtyper/lltypesystem/rffi.py
--- a/rpython/rtyper/lltypesystem/rffi.py
+++ b/rpython/rtyper/lltypesystem/rffi.py
@@ -1073,8 +1073,9 @@
if size is None:
size = llmemory.sizeof(tp) # a symbolic result in this case
return size
- if isinstance(tp, lltype.Ptr) or tp is llmemory.Address:
- return globals()['r_void*'].BITS/8
+ if (tp is lltype.Signed or isinstance(tp, lltype.Ptr)
+ or tp is llmemory.Address):
+ return LONG_BIT/8
if tp is lltype.Char or tp is lltype.Bool:
return 1
if tp is lltype.UniChar:
@@ -1087,8 +1088,6 @@
# :-/
return sizeof_c_type("long double")
assert isinstance(tp, lltype.Number)
- if tp is lltype.Signed:
- return LONG_BIT/8
return tp._type.BITS/8
sizeof._annspecialcase_ = 'specialize:memo'
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit