]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1158 v7.3.1158
authorBram Moolenaar <Bram@vim.org>
Mon, 10 Jun 2013 16:36:24 +0000 (18:36 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 10 Jun 2013 16:36:24 +0000 (18:36 +0200)
Problem:    Crash when running test 86. (Jun Takimoto)
Solution:   Define PY_SSIZE_T_CLEAN early. (Elimar Riesebieter)

src/if_python.c
src/if_python3.c
src/version.c

index 254f01a75b478a4339aa6d35bee8ad8374587581..318b170ee2c52eeac69fe4172fde0b43f560251b 100644 (file)
 # undef _XOPEN_SOURCE  /* pyconfig.h defines it as well. */
 #endif
 
+#define PY_SSIZE_T_CLEAN
+
 #include <Python.h>
+
+#if !defined(PY_VERSION_HEX) || PY_VERSION_HEX < 0x02050000
+# undef PY_SSIZE_T_CLEAN
+#endif
+
 #if defined(MACOS) && !defined(MACOS_X_UNIX)
 # include "macglue.h"
 # include <CodeFragments.h>
 #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
-
 #define PyBytes_FromString PyString_FromString
 #define PyBytes_Check PyString_Check
 
index 915d3f83d9ea7f3e98ea06a69ff3dfe4f9b51eba..637ecd1960cb49f5791519bad5f6d9f330ff0a80 100644 (file)
@@ -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 */
 
 # 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>
 #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"
index 4ec8b3ef86c15dfad59b92bfd9cb0834888ee918..46b9c54c2f415f8c6f63f3cda5d6c30f0a376a0a 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1158,
 /**/
     1157,
 /**/