Mercurial > vim
diff src/if_py_both.h @ 3056:2665b456ee59 v7.3.300
updated for version 7.3.300
Problem: Python doesn't parse multi-byte argument correctly.
Solution: Use "t" instead of "s". (lilydjwg)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 07 Sep 2011 19:30:21 +0200 |
parents | 0bef86c5c985 |
children | 60f6df978a41 |
line wrap: on
line diff
--- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -74,7 +74,7 @@ OutputWrite(PyObject *self, PyObject *ar char *str = NULL; int error = ((OutputObject *)(self))->error; - if (!PyArg_ParseTuple(args, "es#", ENC_OPT, &str, &len)) + if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len)) return NULL; Py_BEGIN_ALLOW_THREADS @@ -114,7 +114,7 @@ OutputWritelines(PyObject *self, PyObjec char *str = NULL; PyInt len; - if (!PyArg_Parse(line, "es#", ENC_OPT, &str, &len)) { + if (!PyArg_Parse(line, "et#", ENC_OPT, &str, &len)) { PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); Py_DECREF(list); return NULL;