forked from aniani/vim
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)
This commit is contained in:
parent
53bfca22f1
commit
b830f0c7df
@ -77,6 +77,11 @@ OutputWrite(PyObject *self, PyObject *args)
|
|||||||
if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len))
|
if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len))
|
||||||
return NULL;
|
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
|
Py_BEGIN_ALLOW_THREADS
|
||||||
Python_Lock_Vim();
|
Python_Lock_Vim();
|
||||||
writer((writefn)(error ? emsg : msg), (char_u *)str, len);
|
writer((writefn)(error ? emsg : msg), (char_u *)str, len);
|
||||||
|
@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
497,
|
||||||
/**/
|
/**/
|
||||||
496,
|
496,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user