Add a version of PySys_WriteStderr() that writes to stderr, so we can

use it in tokenizer.c.
This commit is contained in:
Guido van Rossum 1998-08-25 18:12:36 +00:00
parent d0dc5b06a2
commit 47fbc4049e
1 changed files with 27 additions and 0 deletions

View File

@ -211,3 +211,30 @@ PyOS_Readline(prompt)
p[n-1] = '\n'; p[n-1] = '\n';
return realloc(p, n+1); return realloc(p, n+1);
} }
#ifdef HAVE_STDARG_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
#endif
void
#ifdef HAVE_STDARG_PROTOTYPES
PySys_WriteStderr(const char *format, ...)
#else
PySys_WriteStderr(va_alist)
va_dcl
#endif
{
va_list va;
#ifdef HAVE_STDARG_PROTOTYPES
va_start(va, format);
#else
char *format;
va_start(va);
format = va_arg(va, char *);
#endif
vfprintf(stderr, format, va);
va_end(va);
}