[pypy-commit] cffi default: bah, I won't attempt to find the correct #ifdef magic to use on MSVC in C++ mode to know if 'char16_t' exists. The official one doesn't work, so meh.

arigo pypy.commits at gmail.com
Mon Jun 19 06:35:31 EDT 2017


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r2988:40a258cefe22
Date: 2017-06-19 12:35 +0200
http://bitbucket.org/cffi/cffi/changeset/40a258cefe22/

Log:	bah, I won't attempt to find the correct #ifdef magic to use on MSVC
	in C++ mode to know if 'char16_t' exists. The official one doesn't
	work, so meh.

diff --git a/testing/cffi1/test_recompiler.py b/testing/cffi1/test_recompiler.py
--- a/testing/cffi1/test_recompiler.py
+++ b/testing/cffi1/test_recompiler.py
@@ -2259,6 +2259,9 @@
     assert ffi.typeof("int16_t") is ffi.typeof("char16_t") is ffi.typeof("long")
 
 def test_char16_char32_type(no_cpp=False):
+    if no_cpp is False and sys.platform == "win32":
+        py.test.skip("aaaaaaa why do modern MSVC compilers still define "
+                     "a very old __cplusplus value")
     ffi = FFI()
     ffi.cdef("""
         char16_t foo_2bytes(char16_t);
@@ -2269,7 +2272,7 @@
     typedef uint_least16_t char16_t;
     typedef uint_least32_t char32_t;
     #endif
-    
+
     char16_t foo_2bytes(char16_t a) { return (char16_t)(a + 42); }
     char32_t foo_4bytes(char32_t a) { return (char32_t)(a + 42); }
     """, no_cpp=no_cpp)


More information about the pypy-commit mailing list