Kaydet (Commit) a437d459 authored tarafından Tim Peters's avatar Tim Peters

Removed preprocessor gimmick trying to force use of snprintf emulation

before 2.2b1.
üst 7c7ee5f6
...@@ -112,19 +112,17 @@ extern DL_IMPORT(PyObject *) PyErr_ProgramText(char *, int); ...@@ -112,19 +112,17 @@ extern DL_IMPORT(PyObject *) PyErr_ProgramText(char *, int);
/* These APIs aren't really part of the error implementation, but /* These APIs aren't really part of the error implementation, but
often needed to format error messages; the native C lib APIs are often needed to format error messages; the native C lib APIs are
not available on all platforms, which is why we provide emulations not available on all platforms, which is why we provide emulations
for those platforms in Python/mysnprintf.c */ for those platforms in Python/mysnprintf.c,
WARNING: The return value of snprintf varies across platforms; do
not rely on any particular behavior; eventually the C99 defn may
be reliable.
*/
#if defined(MS_WIN32) && !defined(HAVE_SNPRINTF) #if defined(MS_WIN32) && !defined(HAVE_SNPRINTF)
# define HAVE_SNPRINTF # define HAVE_SNPRINTF
# define snprintf _snprintf # define snprintf _snprintf
# define vsnprintf _vsnprintf # define vsnprintf _vsnprintf
#endif #endif
/* Always enable the fallback solution during the 2.2.0 alpha cycle
for enhanced testing */
#if PY_VERSION_HEX < 0x020200B0
# undef HAVE_SNPRINTF
#endif
#ifndef HAVE_SNPRINTF #ifndef HAVE_SNPRINTF
#include <stdarg.h> #include <stdarg.h>
extern DL_IMPORT(int) PyOS_snprintf(char *str, size_t size, const char *format, ...) extern DL_IMPORT(int) PyOS_snprintf(char *str, size_t size, const char *format, ...)
......
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