This removes the need for older code that avoided a crash
but meant that output wasn't displayed.
---
 src/if_py_both.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/if_py_both.h b/src/if_py_both.h
index 60375d1..931ecb9 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -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);
-- 
1.7.11.4

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui