Philip Jenvey avatar Philip Jenvey committed 0cd18b8 Merge

merge default

Comments (0)

Files changed (3)

lib_pypy/_ctypes/structure.py

         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
 

pypy/module/micronumpy/compile.py

         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")

pypy/module/test_lib_pypy/ctypes_tests/test_structures.py

             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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.