[pypy-commit] pypy operrfmt-NT: merge default
pjenvey
noreply at buildbot.pypy.org
Sun May 26 00:35:52 CEST 2013
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: operrfmt-NT
Changeset: r64561:0cd18b874a6c
Date: 2013-05-25 15:31 -0700
http://bitbucket.org/pypy/pypy/changeset/0cd18b874a6c/
Log: merge default
diff --git a/lib_pypy/_ctypes/structure.py b/lib_pypy/_ctypes/structure.py
--- a/lib_pypy/_ctypes/structure.py
+++ b/lib_pypy/_ctypes/structure.py
@@ -166,8 +166,7 @@
if self is StructOrUnion:
return
if '_fields_' not in self.__dict__:
- self._fields_ = []
- _set_shape(self, [], self._is_union)
+ self._fields_ = [] # As a side-effet, this also sets the ffishape.
__setattr__ = struct_setattr
diff --git a/pypy/module/micronumpy/compile.py b/pypy/module/micronumpy/compile.py
--- a/pypy/module/micronumpy/compile.py
+++ b/pypy/module/micronumpy/compile.py
@@ -46,11 +46,11 @@
self.name = name
class FakeSpace(object):
- w_ValueError = "ValueError"
- w_TypeError = "TypeError"
- w_IndexError = "IndexError"
- w_OverflowError = "OverflowError"
- w_NotImplementedError = "NotImplementedError"
+ w_ValueError = W_TypeObject("ValueError")
+ w_TypeError = W_TypeObject("TypeError")
+ w_IndexError = W_TypeObject("IndexError")
+ w_OverflowError = W_TypeObject("OverflowError")
+ w_NotImplementedError = W_TypeObject("NotImplementedError")
w_None = None
w_bool = W_TypeObject("bool")
diff --git a/pypy/module/test_lib_pypy/ctypes_tests/test_structures.py b/pypy/module/test_lib_pypy/ctypes_tests/test_structures.py
--- a/pypy/module/test_lib_pypy/ctypes_tests/test_structures.py
+++ b/pypy/module/test_lib_pypy/ctypes_tests/test_structures.py
@@ -239,6 +239,9 @@
pass
pos = POSITION(1, 2)
assert (pos.x, pos.y) == (1, 2)
+ # Try a second time, result may be different (cf. issue1498)
+ pos = POSITION(1, 2)
+ assert (pos.x, pos.y) == (1, 2)
def test_invalid_field_types(self):
More information about the pypy-commit
mailing list