[pypy-commit] pypy default: re-run import_cffi.py

arigo noreply at buildbot.pypy.org
Fri Jan 9 11:59:53 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r75271:7559d793c6b0
Date: 2015-01-09 11:58 +0100
http://bitbucket.org/pypy/pypy/changeset/7559d793c6b0/

Log:	re-run import_cffi.py

diff --git a/lib_pypy/cffi/commontypes.py b/lib_pypy/cffi/commontypes.py
--- a/lib_pypy/cffi/commontypes.py
+++ b/lib_pypy/cffi/commontypes.py
@@ -243,7 +243,7 @@
         "LPTSTR": "set-unicode-needed",
         "PTSTR": "set-unicode-needed",
         "PTBYTE": "set-unicode-needed",
-        "PTCHAR;": "set-unicode-needed",
+        "PTCHAR": "set-unicode-needed",
         })
     return result
 
diff --git a/pypy/module/test_lib_pypy/cffi_tests/test_parsing.py b/pypy/module/test_lib_pypy/cffi_tests/test_parsing.py
--- a/pypy/module/test_lib_pypy/cffi_tests/test_parsing.py
+++ b/pypy/module/test_lib_pypy/cffi_tests/test_parsing.py
@@ -248,7 +248,8 @@
         ct = win_common_types(maxsize)
         clear_all(ct)
         for key in sorted(ct):
-            resolve_common_type(key)
+            if ct[key] != 'set-unicode-needed':
+                resolve_common_type(key)
     # assert did not crash
     # now try to use e.g. WPARAM (-> UINT_PTR -> unsigned 32/64-bit)
     for maxsize in [2**32-1, 2**64-1]:
diff --git a/pypy/module/test_lib_pypy/cffi_tests/test_verify.py b/pypy/module/test_lib_pypy/cffi_tests/test_verify.py
--- a/pypy/module/test_lib_pypy/cffi_tests/test_verify.py
+++ b/pypy/module/test_lib_pypy/cffi_tests/test_verify.py
@@ -1221,6 +1221,8 @@
     import platform
     if platform.machine().startswith('sparc'):
         py.test.skip('Breaks horribly on sparc (SIGILL + corrupted stack)')
+    elif platform.machine() == 'mips64' and sys.maxsize > 2**32:
+        py.test.skip('Segfaults on mips64el')
     # XXX bad abuse of "struct { ...; }".  It only works a bit by chance
     # anyway.  XXX think about something better :-(
     ffi = FFI()
@@ -2076,13 +2078,18 @@
     ffi.cdef("typedef union { int a; float b; } Data;"
              "typedef struct { int a:2; } MyStr;"
              "typedef void (*foofunc_t)(Data);"
+             "typedef Data (*bazfunc_t)(void);"
              "typedef MyStr (*barfunc_t)(void);")
     fooptr = ffi.cast("foofunc_t", 123)
+    bazptr = ffi.cast("bazfunc_t", 123)
     barptr = ffi.cast("barfunc_t", 123)
     # assert did not crash so far
     e = py.test.raises(NotImplementedError, fooptr, ffi.new("Data *"))
     assert str(e.value) == (
-        "ctype 'Data' not supported as argument or return value")
+        "ctype 'Data' (size 4) not supported as argument")
+    e = py.test.raises(NotImplementedError, bazptr)
+    assert str(e.value) == (
+        "ctype 'Data' (size 4) not supported as return value")
     e = py.test.raises(NotImplementedError, barptr)
     assert str(e.value) == (
         "ctype 'MyStr' not supported as argument or return value "


More information about the pypy-commit mailing list