Skip to content

Commit bc37a35

Browse files
author
tim_one
committed
Removed preprocessor gimmick trying to force use of snprintf emulation
before 2.2b1. git-svn-id: http://svn.python.org/projects/python/trunk@24374 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 334e373 commit bc37a35

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

Include/pyerrors.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,21 @@ extern DL_IMPORT(void) PyErr_SetInterrupt(void);
108108
/* Support for adding program text to SyntaxErrors */
109109
extern DL_IMPORT(void) PyErr_SyntaxLocation(char *, int);
110110
extern 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>
130128
extern DL_IMPORT(int) PyOS_snprintf(char *str, size_t size, const char *format, ...)

0 commit comments

Comments
 (0)