[pypy-svn] r50738 - in pypy/dist/pypy/lib: _ctypes app_test/ctypes

fijal at codespeak.net fijal at codespeak.net
Thu Jan 17 23:11:02 CET 2008


Author: fijal
Date: Thu Jan 17 23:11:02 2008
New Revision: 50738

Modified:
   pypy/dist/pypy/lib/_ctypes/pointer.py
   pypy/dist/pypy/lib/app_test/ctypes/test_structures.py
Log:
Small tweak and another test passes


Modified: pypy/dist/pypy/lib/_ctypes/pointer.py
==============================================================================
--- pypy/dist/pypy/lib/_ctypes/pointer.py	(original)
+++ pypy/dist/pypy/lib/_ctypes/pointer.py	Thu Jan 17 23:11:02 2008
@@ -30,7 +30,7 @@
 
     def from_param(self, value):
         if value is None:
-            return 0
+            return self(None)
         # If we expect POINTER(<type>), but receive a <type> instance, accept
         # it by calling byref(<type>).
         if isinstance(value, self._type_):

Modified: pypy/dist/pypy/lib/app_test/ctypes/test_structures.py
==============================================================================
--- pypy/dist/pypy/lib/app_test/ctypes/test_structures.py	(original)
+++ pypy/dist/pypy/lib/app_test/ctypes/test_structures.py	Thu Jan 17 23:11:02 2008
@@ -237,7 +237,7 @@
         raises(TypeError, setattr, POINT, "_fields_", [("x", 1), ("y", 2)])
 
     def test_intarray_fields(self):
-        py.test.skip("???")
+        py.test.skip("unsupported")
         class SomeInts(Structure):
             _fields_ = [("a", c_int * 4)]
 
@@ -383,7 +383,6 @@
         assert items == [1, 2, 3]
 
     def test_none_to_pointer_fields(self):
-        py.test.skip("???")
         class S(Structure):
             _fields_ = [("x", c_int),
                         ("p", POINTER(c_int))]



More information about the Pypy-commit mailing list