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