]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.652 v7.3.652
authorBram Moolenaar <Bram@vim.org>
Wed, 5 Sep 2012 15:28:21 +0000 (17:28 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 5 Sep 2012 15:28:21 +0000 (17:28 +0200)
Problem:    Workaround for Python crash isn't perfect.
Solution:   Change the type of the length argument. (Sean Estabrooks)

src/if_py_both.h
src/version.c

index 60375d11614cef40c051300ca7a26e39ba955b92..931ecb98a78ffc1f730bea327d389911cacc9230 100644 (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);
index 6afaf8d317dcdfa383aa722e0b56a297f7dab67a..37791e6a82d345c64caf645c6586d5f3260b3418 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    652,
 /**/
     651,
 /**/