1. Pypy
  2. Untitled project
  3. pypy

Commits

Philip Jenvey  committed 0cd18b8 Merge

merge default

  • Participants
  • Parent commits 52c9fda, 80ac073
  • Branches operrfmt-NT

Comments (0)

Files changed (3)

File lib_pypy/_ctypes/structure.py

View file
  • Ignore whitespace
         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
 

File pypy/module/micronumpy/compile.py

View file
  • Ignore whitespace
         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")

File pypy/module/test_lib_pypy/ctypes_tests/test_structures.py

View file
  • Ignore whitespace
             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):