Kaydet (Commit) 47fbc404 authored tarafından Guido van Rossum's avatar Guido van Rossum

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

use it in tokenizer.c.
üst d0dc5b06
......@@ -211,3 +211,30 @@ PyOS_Readline(prompt)
p[n-1] = '\n';
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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment