File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,23 +108,21 @@ extern DL_IMPORT(void) PyErr_SetInterrupt(void);
108108/* Support for adding program text to SyntaxErrors */
109109extern DL_IMPORT (void ) PyErr_SyntaxLocation (char * , int );
110110extern DL_IMPORT (PyObject * ) PyErr_ProgramText (char * , int );
111-
111+
112112/* These APIs aren't really part of the error implementation, but
113113 often needed to format error messages; the native C lib APIs are
114114 not available on all platforms, which is why we provide emulations
115- for those platforms in Python/mysnprintf.c */
115+ for those platforms in Python/mysnprintf.c,
116+ WARNING: The return value of snprintf varies across platforms; do
117+ not rely on any particular behavior; eventually the C99 defn may
118+ be reliable.
119+ */
116120#if defined(MS_WIN32 ) && !defined(HAVE_SNPRINTF )
117121# define HAVE_SNPRINTF
118122# define snprintf _snprintf
119123# define vsnprintf _vsnprintf
120124#endif
121125
122- /* Always enable the fallback solution during the 2.2.0 alpha cycle
123- for enhanced testing */
124- #if PY_VERSION_HEX < 0x020200B0
125- # undef HAVE_SNPRINTF
126- #endif
127-
128126#ifndef HAVE_SNPRINTF
129127#include <stdarg.h>
130128extern DL_IMPORT (int ) PyOS_snprintf (char * str , size_t size , const char * format , ...)
You can’t perform that action at this time.
0 commit comments