[Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.135,2.136
Tim Peters
tim_one@users.sourceforge.net
Tue, 02 Oct 2001 14:32:10 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv475/python/Objects
Modified Files:
stringobject.c
Log Message:
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().
Index: stringobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
retrieving revision 2.135
retrieving revision 2.136
diff -C2 -d -r2.135 -r2.136
*** stringobject.c 2001/09/27 20:30:07 2.135
--- stringobject.c 2001/10/02 21:32:07 2.136
***************
*** 151,155 ****
PyString_FromFormatV(const char *format, va_list vargs)
{
! va_list count = vargs;
int n = 0;
const char* f;
--- 151,155 ----
PyString_FromFormatV(const char *format, va_list vargs)
{
! va_list count;
int n = 0;
const char* f;
***************
*** 157,160 ****
--- 157,165 ----
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++) {