5954504
To: vim_dev@googlegroups.com
5954504
Subject: Patch 7.3.232
5954504
Fcc: outbox
5954504
From: Bram Moolenaar <Bram@moolenaar.net>
5954504
Mime-Version: 1.0
5954504
Content-Type: text/plain; charset=UTF-8
5954504
Content-Transfer-Encoding: 8bit
5954504
------------
5954504
5954504
Patch 7.3.232
5954504
Problem:    Python doesn't compile without +multi_byte
5954504
Solution:   Use "latin1" when MULTI_BYTE is not defined.
5954504
Files:      src/if_py_both.h
5954504
5954504
5954504
*** ../vim-7.3.231/src/if_py_both.h	2011-06-19 00:27:46.000000000 +0200
5954504
--- src/if_py_both.h	2011-06-26 03:58:07.000000000 +0200
5954504
***************
5954504
*** 12,17 ****
5954504
--- 12,23 ----
5954504
   * Common code for if_python.c and if_python3.c.
5954504
   */
5954504
  
5954504
+ #ifdef FEAT_MBYTE
5954504
+ # define ENC_OPT p_enc
5954504
+ #else
5954504
+ # define ENC_OPT "latin1"
5954504
+ #endif
5954504
+ 
5954504
  /*
5954504
   * obtain a lock on the Vim data structures
5954504
   */
5954504
***************
5954504
*** 68,74 ****
5954504
      char *str = NULL;
5954504
      int error = ((OutputObject *)(self))->error;
5954504
  
5954504
!     if (!PyArg_ParseTuple(args, "es#", p_enc, &str, &len))
5954504
  	return NULL;
5954504
  
5954504
      Py_BEGIN_ALLOW_THREADS
5954504
--- 74,80 ----
5954504
      char *str = NULL;
5954504
      int error = ((OutputObject *)(self))->error;
5954504
  
5954504
!     if (!PyArg_ParseTuple(args, "es#", ENC_OPT, &str, &len))
5954504
  	return NULL;
5954504
  
5954504
      Py_BEGIN_ALLOW_THREADS
5954504
***************
5954504
*** 108,114 ****
5954504
  	char *str = NULL;
5954504
  	PyInt len;
5954504
  
5954504
! 	if (!PyArg_Parse(line, "es#", p_enc, &str, &len)) {
5954504
  	    PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings"));
5954504
  	    Py_DECREF(list);
5954504
  	    return NULL;
5954504
--- 114,120 ----
5954504
  	char *str = NULL;
5954504
  	PyInt len;
5954504
  
5954504
! 	if (!PyArg_Parse(line, "es#", ENC_OPT, &str, &len)) {
5954504
  	    PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings"));
5954504
  	    Py_DECREF(list);
5954504
  	    return NULL;
5954504
*** ../vim-7.3.231/src/version.c	2011-06-26 03:16:58.000000000 +0200
5954504
--- src/version.c	2011-06-26 04:00:40.000000000 +0200
5954504
***************
5954504
*** 711,712 ****
5954504
--- 711,714 ----
5954504
  {   /* Add new patch number below this line */
5954504
+ /**/
5954504
+     232,
5954504
  /**/
5954504
5954504
-- 
5954504
If evolution theories are correct, humans will soon grow a third
5954504
hand for operating the mouse.
5954504
5954504
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
5954504
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
5954504
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
5954504
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///