summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-07-28 10:23:27 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-07-28 10:23:27 (GMT)
commit75d2d94e0f049162c6ef353a89c5703eb78eaaf6 (patch)
tree7dd95594c03ae6b85569ec52c6c30eb0c6900bc7 /Python
parent09c35f78fe57fd0edbccad4423ecbbf8ca845e09 (diff)
downloadcpython-75d2d94e0f049162c6ef353a89c5703eb78eaaf6.zip
cpython-75d2d94e0f049162c6ef353a89c5703eb78eaaf6.tar.gz
cpython-75d2d94e0f049162c6ef353a89c5703eb78eaaf6.tar.bz2
Patch #554716: Use __va_copy where available.
Diffstat (limited to 'Python')
-rw-r--r--Python/getargs.c4
-rw-r--r--Python/modsupport.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index 280ffc3..cc0409d 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -61,8 +61,12 @@ PyArg_VaParse(PyObject *args, char *format, va_list va)
#ifdef VA_LIST_IS_ARRAY
memcpy(lva, va, sizeof(va_list));
#else
+#ifdef __va_copy
+ __va_copy(lva, va);
+#else
lva = va;
#endif
+#endif
return vgetargs1(args, format, &lva, 0);
}
diff --git a/Python/modsupport.c b/Python/modsupport.c
index f4f8298..1f8ef07 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -418,8 +418,12 @@ Py_VaBuildValue(char *format, va_list va)
#ifdef VA_LIST_IS_ARRAY
memcpy(lva, va, sizeof(va_list));
#else
+#ifdef __va_copy
+ __va_copy(lva, va);
+#else
lva = va;
#endif
+#endif
if (n < 0)
return NULL;