Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r1126:5a617a8f418b
Date: 2013-02-07 21:05 +0100
http://bitbucket.org/cffi/cffi/changeset/5a617a8f418b/

Log:    * Win32 fix
        * Don't depend on the order in which the two calls are made!

diff --git a/testing/test_verify.py b/testing/test_verify.py
--- a/testing/test_verify.py
+++ b/testing/test_verify.py
@@ -1455,7 +1455,12 @@
     """)
     lib = ffi.verify("""
         #include <stdarg.h>
+        #ifdef _WIN32
+        #include <malloc.h>
+        #define alloca _alloca
+        #else
         #include <alloca.h>
+        #endif
         static int (*python_callback)(int how_many, int *values);
         static int c_callback(int how_many, ...) {
             va_list ap;
@@ -1468,7 +1473,9 @@
             return python_callback(how_many, values);
         }
         int some_c_function(int(*cb)(int,...)) {
-            return cb(2, 10, 20) + cb(3, 30, 40, 50);
+            int result = cb(2, 10, 20);
+            result += cb(3, 30, 40, 50);
+            return result;
         }
     """)
     seen = []
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to