# HG changeset patch # User Bram Moolenaar # Date 1334921481 -7200 # Node ID e34c620007be9fd805556c43fe848de521f3b64c # Parent 161d01cbb16585c97faa036fd3acc96a91b2056f updated for version 7.3.497 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) diff --git a/src/if_py_both.h b/src/if_py_both.h --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -77,6 +77,11 @@ OutputWrite(PyObject *self, PyObject *ar 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); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 497, +/**/ 496, /**/ 495,