]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.497 v7.3.497
authorBram Moolenaar <Bram@vim.org>
Fri, 20 Apr 2012 11:31:21 +0000 (13:31 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 20 Apr 2012 11:31:21 +0000 (13:31 +0200)
Problem:    Crash when doing ":python print" and compiled with gcc and
            the optimizer enabled.
Solution:   Avoid the crash, doesn't really fix the problem. (Christian
            Brabandt)

src/if_py_both.h
src/version.c

index aa2591267dedd0ef5937a383184c7caf5a8975fc..cbfbaa76736f87ca4f8053c93898f810c69c85a2 100644 (file)
@@ -77,6 +77,11 @@ OutputWrite(PyObject *self, PyObject *args)
     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 c0d60e8aad48cee7118b9d2c9881c4a44802bfcb..b2f26a9ba418df5010cb907f4a6226f162d0ce28 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    497,
 /**/
     496,
 /**/