[pypy-commit] pypy default: Attempting to fix the assert detecting mixed 32/64-bits.
arigo
noreply at buildbot.pypy.org
Mon Jun 11 19:41:50 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r55597:cdb2d1b3d0da
Date: 2012-06-11 19:41 +0200
http://bitbucket.org/pypy/pypy/changeset/cdb2d1b3d0da/
Log: Attempting to fix the assert detecting mixed 32/64-bits.
diff --git a/pypy/rpython/lltypesystem/rffi.py b/pypy/rpython/lltypesystem/rffi.py
--- a/pypy/rpython/lltypesystem/rffi.py
+++ b/pypy/rpython/lltypesystem/rffi.py
@@ -934,7 +934,7 @@
offsetof._annspecialcase_ = 'specialize:memo'
# check that we have a sane configuration
-assert maxint == (1 << (8 * sizeof(lltype.Signed) - 1)) - 1, (
+assert maxint == (1 << (8 * platform._size_of_Signed - 1)) - 1, (
"Mixed configuration of the word size of the machine:\n\t"
"the underlying Python was compiled with maxint=%d,\n\t"
"but the C compiler says that 'long' is %d bytes" % (
diff --git a/pypy/rpython/tool/rfficache.py b/pypy/rpython/tool/rfficache.py
--- a/pypy/rpython/tool/rfficache.py
+++ b/pypy/rpython/tool/rfficache.py
@@ -67,6 +67,8 @@
def _make_type(self, name, signed, size):
inttype = rarithmetic.build_int('r_' + name, signed, size*8)
tp = lltype.build_number(name, inttype)
+ if tp is lltype.Signed:
+ self._size_of_Signed = size
self.numbertype_to_rclass[tp] = inttype
self.types[name] = tp
return tp
More information about the pypy-commit
mailing list