[pypy-commit] cffi default: wchar_t is 4 byte, signed on arm64

stefanor noreply at buildbot.pypy.org
Thu Jan 23 10:51:46 CET 2014


Author: Stefano Rivera <stefano at rivera.za.net>
Branch: 
Changeset: r1459:cee02a6ecfcd
Date: 2014-01-22 13:06 +0200
http://bitbucket.org/cffi/cffi/changeset/cee02a6ecfcd/

Log:	wchar_t is 4 byte, signed on arm64

diff --git a/testing/backend_tests.py b/testing/backend_tests.py
--- a/testing/backend_tests.py
+++ b/testing/backend_tests.py
@@ -1,4 +1,5 @@
 import py
+import platform
 import sys, ctypes
 from cffi import FFI, CDefError
 from testing.support import *
@@ -755,6 +756,8 @@
         p = ffi.cast("long long", ffi.cast("wchar_t", -1))
         if SIZE_OF_WCHAR == 2:      # 2 bytes, unsigned
             assert int(p) == 0xffff
+        elif platform.machine() == 'aarch64': # 4 bytes, unsigned
+            assert int(p) == 0xffffffff
         else:                       # 4 bytes, signed
             assert int(p) == -1
         p = ffi.cast("int", u+'\u1234')


More information about the pypy-commit mailing list