Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r57586:c3f9282e1524
Date: 2012-09-25 21:24 +0000
http://bitbucket.org/pypy/pypy/changeset/c3f9282e1524/
Log: Fix VA_COPY on 32bit platforms, this lets all cpyext run to the end.
diff --git a/pypy/module/cpyext/include/pyport.h
b/pypy/module/cpyext/include/pyport.h
--- a/pypy/module/cpyext/include/pyport.h
+++ b/pypy/module/cpyext/include/pyport.h
@@ -64,12 +64,14 @@
# error "Python needs a typedef for Py_uintptr_t in pyport.h."
#endif /* HAVE_UINTPTR_T */
+#include <stdarg.h>
+
+#ifdef __va_copy
+#define Py_VA_COPY __va_copy
+#else
#ifdef VA_LIST_IS_ARRAY
#define Py_VA_COPY(x, y) Py_MEMCPY((x), (y), sizeof(va_list))
#else
-#ifdef __va_copy
-#define Py_VA_COPY __va_copy
-#else
#define Py_VA_COPY(x, y) (x) = (y)
#endif
#endif
diff --git a/pypy/module/cpyext/src/abstract.c
b/pypy/module/cpyext/src/abstract.c
--- a/pypy/module/cpyext/src/abstract.c
+++ b/pypy/module/cpyext/src/abstract.c
@@ -214,15 +214,7 @@
va_list countva;
PyObject *result, *tmp;
-#ifdef VA_LIST_IS_ARRAY
- memcpy(countva, va, sizeof(va_list));
-#else
-#ifdef __va_copy
- __va_copy(countva, va);
-#else
- countva = va;
-#endif
-#endif
+ Py_VA_COPY(countva, va);
while (((PyObject *)va_arg(countva, PyObject *)) != NULL)
++n;
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit