diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-10-02 21:32:07 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-10-02 21:32:07 (GMT) |
commit | c15c4f1f39b2b3ca799c9a36b72a7c19a3c76e20 (patch) | |
tree | e9fb0ad5dbacfe54676271e06ecc180f699da960 /Objects/stringobject.c | |
parent | 048eb75c2dca8bf6d483b290c901a53510c9b78a (diff) | |
download | cpython-c15c4f1f39b2b3ca799c9a36b72a7c19a3c76e20.zip cpython-c15c4f1f39b2b3ca799c9a36b72a7c19a3c76e20.tar.gz cpython-c15c4f1f39b2b3ca799c9a36b72a7c19a3c76e20.tar.bz2 |
SF bug [#467265] Compile errors on SuSe Linux on IBM/s390.
Unknown whether this fixes it.
- stringobject.c, PyString_FromFormatV: don't assume that va_list is of
a type that can be copied via an initializer.
- errors.c, PyErr_Format: add a va_end() to balance the va_start().
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 7 |
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 == '%') { |