0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.3.652

Problem:    Workaround for Python crash isn't perfect.
Solution:   Change the type of the length argument. (Sean Estabrooks)
This commit is contained in:
Bram Moolenaar
2012-09-05 17:28:21 +02:00
parent 7c0a86b1e8
commit ac0ddc15e9
2 changed files with 3 additions and 6 deletions

View File

@@ -74,18 +74,13 @@ static struct PyMethodDef OutputMethods[] = {
static PyObject *
OutputWrite(PyObject *self, PyObject *args)
{
int len;
Py_ssize_t len;
char *str = NULL;
int error = ((OutputObject *)(self))->error;
if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len))
return NULL;
/* TODO: This works around a gcc optimizer problem and avoids Vim
* from crashing. Should find a real solution. */
if (str == NULL)
return NULL;
Py_BEGIN_ALLOW_THREADS
Python_Lock_Vim();
writer((writefn)(error ? emsg : msg), (char_u *)str, len);