Author: Christian Tismer <[email protected]>
Branch: win64_gborg
Changeset: r48975:d4d34a4e70e5
Date: 2011-11-08 23:45 +0100
http://bitbucket.org/pypy/pypy/changeset/d4d34a4e70e5/
Log: all of test_ll_os works now (more than before is started win64 ;-)
diff --git a/pypy/rpython/lltypesystem/llmemory.py
b/pypy/rpython/lltypesystem/llmemory.py
--- a/pypy/rpython/lltypesystem/llmemory.py
+++ b/pypy/rpython/lltypesystem/llmemory.py
@@ -57,7 +57,7 @@
return "<ItemOffset %r %r>" % (self.TYPE, self.repeat)
def __mul__(self, other):
- if not isinstance(other, int):
+ if not isinstance(other, (int, long)):
return NotImplemented
return ItemOffset(self.TYPE, self.repeat * other)
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
@@ -1655,7 +1655,7 @@
__slots__ = ('items',)
def __init__(self, TYPE, n, initialization=None, parent=None,
parentindex=None):
- if not isinstance(n, int):
+ if not isinstance(n, (int, long)):
raise TypeError, "array length must be an int"
if n < 0:
raise ValueError, "negative array length"
diff --git a/pypy/rpython/module/test/test_ll_os.py
b/pypy/rpython/module/test/test_ll_os.py
--- a/pypy/rpython/module/test/test_ll_os.py
+++ b/pypy/rpython/module/test/test_ll_os.py
@@ -80,7 +80,10 @@
pwd = os.getcwd()
import ctypes
buf = ctypes.create_string_buffer(1000)
- ctypes.windll.kernel32.GetEnvironmentVariableA('=%c:' % pwd[0], buf,
1000)
+ len = ctypes.windll.kernel32.GetEnvironmentVariableA('=%c:' % pwd[0],
buf, 1000)
+ if (len == 0) and "WINGDB_PYTHON" in os.environ:
+ # the ctypes call seems not to work in the Wing debugger
+ return
assert str(buf.value).lower() == pwd
# ctypes returns the drive letter in uppercase, os.getcwd does not
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit