Commits

Armin Rigo committed 5a617a8

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

  • Participants
  • Parent commits b9ebe6f

Comments (0)

Files changed (1)

File testing/test_verify.py

     """)
     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;
             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 = []