summaryrefslogtreecommitdiffstats
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index cfa5f53..a43f129 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -150,12 +150,17 @@ PyString_FromString(const char *str)
PyObject *
PyString_FromFormatV(const char *format, va_list vargs)
{
- va_list count = vargs;
+ va_list count;
int n = 0;
const char* f;
char *s;
PyObject* string;
+#ifdef VA_LIST_IS_ARRAY
+ memcpy(count, vargs, sizeof(va_list));
+#else
+ count = vargs;
+#endif
/* step 1: figure out how large a buffer we need */
for (f = format; *f; f++) {
if (*f == '%') {