summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-03-22 15:47:44 +0100
committerBram Moolenaar <Bram@vim.org>2011-03-22 15:47:44 +0100
commita29a37d533744e1b8200b1d2e032d0f8d186ab98 (patch)
treeea402db1749bcff9ee54c15eb2fcf9cbe410ceaa
parent0b2f94db2325ed2cbff452eb9373b1ff13f19fce (diff)
updated for version 7.3.142v7.3.142
Problem: Python stdout doesn't have a flush() method, causing an import to fail. Solution: Add a dummy flush() method. (Tobias Columbus)
-rw-r--r--src/if_py_both.h17
-rw-r--r--src/version.c2
2 files changed, 16 insertions, 3 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index e435e3e5c0..f78eccbd04 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -33,6 +33,7 @@ Python_Release_Vim(void)
static PyObject *OutputWrite(PyObject *, PyObject *);
static PyObject *OutputWritelines(PyObject *, PyObject *);
+static PyObject *OutputFlush(PyObject *, PyObject *);
/* Function to write a line, points to either msg() or emsg(). */
typedef void (*writefn)(char_u *);
@@ -47,9 +48,10 @@ typedef struct
static struct PyMethodDef OutputMethods[] = {
/* name, function, calling, documentation */
- {"write", OutputWrite, 1, "" },
- {"writelines", OutputWritelines, 1, "" },
- { NULL, NULL, 0, NULL }
+ {"write", OutputWrite, 1, ""},
+ {"writelines", OutputWritelines, 1, ""},
+ {"flush", OutputFlush, 1, ""},
+ { NULL, NULL, 0, NULL}
};
#define PyErr_SetVim(str) PyErr_SetString(VimError, str)
@@ -123,6 +125,15 @@ OutputWritelines(PyObject *self, PyObject *args)
return Py_None;
}
+ static PyObject *
+OutputFlush(PyObject *self UNUSED, PyObject *args UNUSED)
+{
+ /* do nothing */
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+
/* Buffer IO, we write one whole line at a time. */
static garray_T io_ga = {0, 0, 1, 80, NULL};
static writefn old_fn = NULL;
diff --git a/src/version.c b/src/version.c
index 3505097fb5..6b266006cc 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 142,
+/**/
141,
/**/
140,