| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.497 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 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) |
| Files: src/if_py_both.h |
| |
| |
| |
| |
| |
| *** 77,82 **** |
| --- 77,87 ---- |
| 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); |
| |
| |
| |
| *** 716,717 **** |
| --- 716,719 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 497, |
| /**/ |
| |
| -- |
| There can't be a crisis today, my schedule is already full. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |