|
Karsten Hopp |
a72b1a |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
a72b1a |
Subject: Patch 7.3.236
|
|
Karsten Hopp |
a72b1a |
Fcc: outbox
|
|
Karsten Hopp |
a72b1a |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
a72b1a |
Mime-Version: 1.0
|
|
Karsten Hopp |
a72b1a |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
a72b1a |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
a72b1a |
------------
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
Patch 7.3.236 (after 7.3.232)
|
|
Karsten Hopp |
a72b1a |
Problem: Python 3 doesn't compile without +multi_byte
|
|
Karsten Hopp |
a72b1a |
Solution: Use "latin1" when MULTI_BYTE is not defined. (lilydjwg)
|
|
Karsten Hopp |
a72b1a |
Files: src/if_python3.c
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
*** ../vim-7.3.235/src/if_python3.c 2011-06-19 00:27:46.000000000 +0200
|
|
Karsten Hopp |
a72b1a |
--- src/if_python3.c 2011-06-26 19:10:57.000000000 +0200
|
|
Karsten Hopp |
a72b1a |
***************
|
|
Karsten Hopp |
a72b1a |
*** 70,76 ****
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
#define PyInt Py_ssize_t
|
|
Karsten Hopp |
a72b1a |
#define PyString_Check(obj) PyUnicode_Check(obj)
|
|
Karsten Hopp |
a72b1a |
! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)p_enc, NULL);
|
|
Karsten Hopp |
a72b1a |
#define PyString_FreeBytes(obj) Py_XDECREF(bytes)
|
|
Karsten Hopp |
a72b1a |
#define PyString_AsString(obj) PyBytes_AsString(obj)
|
|
Karsten Hopp |
a72b1a |
#define PyString_Size(obj) PyBytes_GET_SIZE(bytes)
|
|
Karsten Hopp |
a72b1a |
--- 70,76 ----
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
#define PyInt Py_ssize_t
|
|
Karsten Hopp |
a72b1a |
#define PyString_Check(obj) PyUnicode_Check(obj)
|
|
Karsten Hopp |
a72b1a |
! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)ENC_OPT, NULL);
|
|
Karsten Hopp |
a72b1a |
#define PyString_FreeBytes(obj) Py_XDECREF(bytes)
|
|
Karsten Hopp |
a72b1a |
#define PyString_AsString(obj) PyBytes_AsString(obj)
|
|
Karsten Hopp |
a72b1a |
#define PyString_Size(obj) PyBytes_GET_SIZE(bytes)
|
|
Karsten Hopp |
a72b1a |
***************
|
|
Karsten Hopp |
a72b1a |
*** 661,667 ****
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
/* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause
|
|
Karsten Hopp |
a72b1a |
* SyntaxError (unicode error). */
|
|
Karsten Hopp |
a72b1a |
! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), (char *)p_enc, NULL);
|
|
Karsten Hopp |
a72b1a |
cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", NULL);
|
|
Karsten Hopp |
a72b1a |
Py_XDECREF(cmdstr);
|
|
Karsten Hopp |
a72b1a |
PyRun_SimpleString(PyBytes_AsString(cmdbytes));
|
|
Karsten Hopp |
a72b1a |
--- 661,667 ----
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
/* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause
|
|
Karsten Hopp |
a72b1a |
* SyntaxError (unicode error). */
|
|
Karsten Hopp |
a72b1a |
! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), (char *)ENC_OPT, NULL);
|
|
Karsten Hopp |
a72b1a |
cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", NULL);
|
|
Karsten Hopp |
a72b1a |
Py_XDECREF(cmdstr);
|
|
Karsten Hopp |
a72b1a |
PyRun_SimpleString(PyBytes_AsString(cmdbytes));
|
|
Karsten Hopp |
a72b1a |
***************
|
|
Karsten Hopp |
a72b1a |
*** 1463,1469 ****
|
|
Karsten Hopp |
a72b1a |
}
|
|
Karsten Hopp |
a72b1a |
*p = '\0';
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
! result = PyUnicode_Decode(tmp, len, (char *)p_enc, NULL);
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
vim_free(tmp);
|
|
Karsten Hopp |
a72b1a |
return result;
|
|
Karsten Hopp |
a72b1a |
--- 1463,1469 ----
|
|
Karsten Hopp |
a72b1a |
}
|
|
Karsten Hopp |
a72b1a |
*p = '\0';
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
! result = PyUnicode_Decode(tmp, len, (char *)ENC_OPT, NULL);
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
vim_free(tmp);
|
|
Karsten Hopp |
a72b1a |
return result;
|
|
Karsten Hopp |
a72b1a |
*** ../vim-7.3.235/src/version.c 2011-06-26 05:36:07.000000000 +0200
|
|
Karsten Hopp |
a72b1a |
--- src/version.c 2011-06-26 19:12:12.000000000 +0200
|
|
Karsten Hopp |
a72b1a |
***************
|
|
Karsten Hopp |
a72b1a |
*** 711,712 ****
|
|
Karsten Hopp |
a72b1a |
--- 711,714 ----
|
|
Karsten Hopp |
a72b1a |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
a72b1a |
+ /**/
|
|
Karsten Hopp |
a72b1a |
+ 236,
|
|
Karsten Hopp |
a72b1a |
/**/
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
--
|
|
Karsten Hopp |
a72b1a |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
a72b1a |
228. You spend Saturday night making the counter on your home page
|
|
Karsten Hopp |
a72b1a |
pass that 2000 mark.
|
|
Karsten Hopp |
a72b1a |
|
|
Karsten Hopp |
a72b1a |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
a72b1a |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
a72b1a |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
a72b1a |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|