home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.1158 < prev    next >
Encoding:
Internet Message Format  |  2013-06-09  |  3.2 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.1158
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.1158
  11. Problem:    Crash when running test 86. (Jun Takimoto)
  12. Solution:   Define PY_SSIZE_T_CLEAN early. (Elimar Riesebieter)
  13. Files:        src/if_python.c, src/if_python3.c
  14.  
  15.  
  16. *** ../vim-7.3.1157/src/if_python.c    2013-06-02 18:20:12.000000000 +0200
  17. --- src/if_python.c    2013-06-10 18:19:52.000000000 +0200
  18. ***************
  19. *** 53,59 ****
  20. --- 53,66 ----
  21.   # undef _XOPEN_SOURCE    /* pyconfig.h defines it as well. */
  22.   #endif
  23.   
  24. + #define PY_SSIZE_T_CLEAN
  25.   #include <Python.h>
  26. + #if !defined(PY_VERSION_HEX) || PY_VERSION_HEX < 0x02050000
  27. + # undef PY_SSIZE_T_CLEAN
  28. + #endif
  29.   #if defined(MACOS) && !defined(MACOS_X_UNIX)
  30.   # include "macglue.h"
  31.   # include <CodeFragments.h>
  32. ***************
  33. *** 61,70 ****
  34.   #undef main /* Defined in python.h - aargh */
  35.   #undef HAVE_FCNTL_H /* Clash with os_win32.h */
  36.   
  37. - #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000
  38. - # define PY_SSIZE_T_CLEAN
  39. - #endif
  40.   #define PyBytes_FromString PyString_FromString
  41.   #define PyBytes_Check PyString_Check
  42.   
  43. --- 68,73 ----
  44. *** ../vim-7.3.1157/src/if_python3.c    2013-06-02 18:20:12.000000000 +0200
  45. --- src/if_python3.c    2013-06-10 18:24:36.000000000 +0200
  46. ***************
  47. *** 24,32 ****
  48.   
  49.   /* uncomment this if used with the debug version of python */
  50.   /* #define Py_DEBUG */
  51. ! /* Note: most of time you can add -DPy_DEBUG to CFLAGS in place of uncommenting 
  52.    */
  53. ! /* uncomment this if used with the debug version of python, but without its 
  54.    * allocator */
  55.   /* #define Py_DEBUG_NO_PYMALLOC */
  56.   
  57. --- 24,32 ----
  58.   
  59.   /* uncomment this if used with the debug version of python */
  60.   /* #define Py_DEBUG */
  61. ! /* Note: most of time you can add -DPy_DEBUG to CFLAGS in place of uncommenting
  62.    */
  63. ! /* uncomment this if used with the debug version of python, but without its
  64.    * allocator */
  65.   /* #define Py_DEBUG_NO_PYMALLOC */
  66.   
  67. ***************
  68. *** 61,67 ****
  69. --- 61,70 ----
  70.   # undef _XOPEN_SOURCE    /* pyconfig.h defines it as well. */
  71.   #endif
  72.   
  73. + #define PY_SSIZE_T_CLEAN
  74.   #include <Python.h>
  75.   #if defined(MACOS) && !defined(MACOS_X_UNIX)
  76.   # include "macglue.h"
  77.   # include <CodeFragments.h>
  78. ***************
  79. *** 69,78 ****
  80.   #undef main /* Defined in python.h - aargh */
  81.   #undef HAVE_FCNTL_H /* Clash with os_win32.h */
  82.   
  83. - #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000
  84. - # define PY_SSIZE_T_CLEAN
  85. - #endif
  86.   /* The "surrogateescape" error handler is new in Python 3.1 */
  87.   #if PY_VERSION_HEX >= 0x030100f0
  88.   # define CODEC_ERROR_HANDLER "surrogateescape"
  89. --- 72,77 ----
  90. *** ../vim-7.3.1157/src/version.c    2013-06-10 16:35:11.000000000 +0200
  91. --- src/version.c    2013-06-10 18:25:01.000000000 +0200
  92. ***************
  93. *** 730,731 ****
  94. --- 730,733 ----
  95.   {   /* Add new patch number below this line */
  96. + /**/
  97. +     1158,
  98.   /**/
  99.  
  100. -- 
  101. Never eat yellow snow.
  102.  
  103.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  104. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  105. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  106.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  107.