summaryrefslogtreecommitdiffstats
path: root/Objects
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 /Objects
parent09c35f78fe57fd0edbccad4423ecbbf8ca845e09 (diff)
downloadcpython-75d2d94e0f049162c6ef353a89c5703eb78eaaf6.zip
cpython-75d2d94e0f049162c6ef353a89c5703eb78eaaf6.tar.gz
cpython-75d2d94e0f049162c6ef353a89c5703eb78eaaf6.tar.bz2
Patch #554716: Use __va_copy where available.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/abstract.c4
-rw-r--r--Objects/stringobject.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 1f9b603..fc73a9f 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -1793,8 +1793,12 @@ objargs_mktuple(va_list va)
#ifdef VA_LIST_IS_ARRAY
memcpy(countva, va, sizeof(va_list));
#else
+#ifdef __va_copy
+ __va_copy(countva, va);
+#else
countva = va;
#endif
+#endif
while (((PyObject *)va_arg(countva, PyObject *)) != NULL)
++n;
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 5e40524..bf548cd 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -156,8 +156,12 @@ PyString_FromFormatV(const char *format, va_list vargs)
#ifdef VA_LIST_IS_ARRAY
memcpy(count, vargs, sizeof(va_list));
#else
+#ifdef __va_copy
+ __va_copy(count, vargs);
+#else
count = vargs;
#endif
+#endif
/* step 1: figure out how large a buffer we need */
for (f = format; *f; f++) {
if (*f == '%') {