diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-10 18:36:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-10 18:36:24 +0200 |
commit | 0bdda37fb4b8118ec4bd797eddca9eaf5d3b381d (patch) | |
tree | 9037d905c68c34ad25a203757d62c20cee526b47 /src/if_python3.c | |
parent | bcf4d178abef9336709b53516fbf0164ce5ebe09 (diff) | |
download | vim-git-0bdda37fb4b8118ec4bd797eddca9eaf5d3b381d.tar.gz |
updated for version 7.3.1158v7.3.1158
Problem: Crash when running test 86. (Jun Takimoto)
Solution: Define PY_SSIZE_T_CLEAN early. (Elimar Riesebieter)
Diffstat (limited to 'src/if_python3.c')
-rw-r--r-- | src/if_python3.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/if_python3.c b/src/if_python3.c index 915d3f83d..637ecd196 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -24,9 +24,9 @@ /* uncomment this if used with the debug version of python */ /* #define Py_DEBUG */ -/* Note: most of time you can add -DPy_DEBUG to CFLAGS in place of uncommenting +/* Note: most of time you can add -DPy_DEBUG to CFLAGS in place of uncommenting */ -/* uncomment this if used with the debug version of python, but without its +/* uncomment this if used with the debug version of python, but without its * allocator */ /* #define Py_DEBUG_NO_PYMALLOC */ @@ -61,7 +61,10 @@ # undef _XOPEN_SOURCE /* pyconfig.h defines it as well. */ #endif +#define PY_SSIZE_T_CLEAN + #include <Python.h> + #if defined(MACOS) && !defined(MACOS_X_UNIX) # include "macglue.h" # include <CodeFragments.h> @@ -69,10 +72,6 @@ #undef main /* Defined in python.h - aargh */ #undef HAVE_FCNTL_H /* Clash with os_win32.h */ -#if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000 -# define PY_SSIZE_T_CLEAN -#endif - /* The "surrogateescape" error handler is new in Python 3.1 */ #if PY_VERSION_HEX >= 0x030100f0 # define CODEC_ERROR_HANDLER "surrogateescape" |