mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.3.232
Problem: Python doesn't compile without +multi_byte Solution: Use "latin1" when MULTI_BYTE is not defined.
This commit is contained in:
@@ -12,6 +12,12 @@
|
|||||||
* Common code for if_python.c and if_python3.c.
|
* Common code for if_python.c and if_python3.c.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef FEAT_MBYTE
|
||||||
|
# define ENC_OPT p_enc
|
||||||
|
#else
|
||||||
|
# define ENC_OPT "latin1"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* obtain a lock on the Vim data structures
|
* obtain a lock on the Vim data structures
|
||||||
*/
|
*/
|
||||||
@@ -68,7 +74,7 @@ OutputWrite(PyObject *self, PyObject *args)
|
|||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
int error = ((OutputObject *)(self))->error;
|
int error = ((OutputObject *)(self))->error;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "es#", p_enc, &str, &len))
|
if (!PyArg_ParseTuple(args, "es#", ENC_OPT, &str, &len))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
@@ -108,7 +114,7 @@ OutputWritelines(PyObject *self, PyObject *args)
|
|||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
PyInt len;
|
PyInt len;
|
||||||
|
|
||||||
if (!PyArg_Parse(line, "es#", p_enc, &str, &len)) {
|
if (!PyArg_Parse(line, "es#", ENC_OPT, &str, &len)) {
|
||||||
PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings"));
|
PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings"));
|
||||||
Py_DECREF(list);
|
Py_DECREF(list);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -709,6 +709,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
232,
|
||||||
/**/
|
/**/
|
||||||
231,
|
231,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user