diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-11-28 16:51:49 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-11-28 16:51:49 (GMT) |
commit | a437d4594bd38a93f5116e345c8f0b06a6593d38 (patch) | |
tree | 5a4c6d9b7cf830d8507d026aeba1c21d4b132e66 /Include/pyerrors.h | |
parent | 7c7ee5f6f683cb895284122155bd830b0fd7c91e (diff) | |
download | cpython-a437d4594bd38a93f5116e345c8f0b06a6593d38.zip cpython-a437d4594bd38a93f5116e345c8f0b06a6593d38.tar.gz cpython-a437d4594bd38a93f5116e345c8f0b06a6593d38.tar.bz2 |
Removed preprocessor gimmick trying to force use of snprintf emulation
before 2.2b1.
Diffstat (limited to 'Include/pyerrors.h')
-rw-r--r-- | Include/pyerrors.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h index 29ee1b6..a1dce1c 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -108,23 +108,21 @@ extern DL_IMPORT(void) PyErr_SetInterrupt(void); /* Support for adding program text to SyntaxErrors */ extern DL_IMPORT(void) PyErr_SyntaxLocation(char *, int); extern DL_IMPORT(PyObject *) PyErr_ProgramText(char *, int); - + /* These APIs aren't really part of the error implementation, but often needed to format error messages; the native C lib APIs are 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) # define HAVE_SNPRINTF # define snprintf _snprintf # define vsnprintf _vsnprintf #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 #include <stdarg.h> extern DL_IMPORT(int) PyOS_snprintf(char *str, size_t size, const char *format, ...) |