Author: Christian Tismer <[email protected]>
Branch:
Changeset: r53466:22e789e3821f
Date: 2012-03-13 11:49 -0700
http://bitbucket.org/pypy/pypy/changeset/22e789e3821f/
Log: Merging the basic win64 changes which are without doubt into default
diff --git a/pypy/rpython/lltypesystem/lltype.py
b/pypy/rpython/lltypesystem/lltype.py
--- a/pypy/rpython/lltypesystem/lltype.py
+++ b/pypy/rpython/lltypesystem/lltype.py
@@ -7,7 +7,7 @@
from pypy.tool.identity_dict import identity_dict
from pypy.tool import leakfinder
from types import NoneType
-from sys import maxint
+from pypy.rlib.rarithmetic import maxint, is_valid_int, is_emulated_long
import weakref
class State(object):
@@ -681,6 +681,11 @@
number = _numbertypes[type] = Number(name, type)
return number
+if is_emulated_long:
+ SignedFmt = 'q'
+else:
+ SignedFmt = 'l'
+
Signed = build_number("Signed", int)
Unsigned = build_number("Unsigned", r_uint)
SignedLongLong = build_number("SignedLongLong", r_longlong)
@@ -1654,7 +1659,7 @@
__slots__ = ('items',)
def __init__(self, TYPE, n, initialization=None, parent=None,
parentindex=None):
- if not isinstance(n, int):
+ if not is_valid_int(n):
raise TypeError, "array length must be an int"
if n < 0:
raise ValueError, "negative array length"
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit