|
Karsten Hopp |
fadecd |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
fadecd |
Subject: Patch 7.4.161
|
|
Karsten Hopp |
fadecd |
Fcc: outbox
|
|
Karsten Hopp |
fadecd |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
fadecd |
Mime-Version: 1.0
|
|
Karsten Hopp |
fadecd |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
fadecd |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
fadecd |
------------
|
|
Karsten Hopp |
fadecd |
|
|
Karsten Hopp |
fadecd |
Patch 7.4.161
|
|
Karsten Hopp |
fadecd |
Problem: Crash in Python exception handling.
|
|
Karsten Hopp |
fadecd |
Solution: Only use exception variables if did_throw is set. (ZyX)
|
|
Karsten Hopp |
fadecd |
Files: if_py_both.h
|
|
Karsten Hopp |
fadecd |
|
|
Karsten Hopp |
fadecd |
|
|
Karsten Hopp |
fadecd |
*** ../vim-7.4.160/src/if_py_both.h 2014-01-14 19:35:49.000000000 +0100
|
|
Karsten Hopp |
fadecd |
--- src/if_py_both.h 2014-01-31 14:46:20.455526607 +0100
|
|
Karsten Hopp |
fadecd |
***************
|
|
Karsten Hopp |
fadecd |
*** 564,573 ****
|
|
Karsten Hopp |
fadecd |
/* Keyboard interrupt should be preferred over anything else */
|
|
Karsten Hopp |
fadecd |
if (got_int)
|
|
Karsten Hopp |
fadecd |
{
|
|
Karsten Hopp |
fadecd |
! if (current_exception != NULL)
|
|
Karsten Hopp |
fadecd |
discard_current_exception();
|
|
Karsten Hopp |
fadecd |
- else
|
|
Karsten Hopp |
fadecd |
- need_rethrow = did_throw = FALSE;
|
|
Karsten Hopp |
fadecd |
got_int = FALSE;
|
|
Karsten Hopp |
fadecd |
PyErr_SetNone(PyExc_KeyboardInterrupt);
|
|
Karsten Hopp |
fadecd |
return -1;
|
|
Karsten Hopp |
fadecd |
--- 564,571 ----
|
|
Karsten Hopp |
fadecd |
/* Keyboard interrupt should be preferred over anything else */
|
|
Karsten Hopp |
fadecd |
if (got_int)
|
|
Karsten Hopp |
fadecd |
{
|
|
Karsten Hopp |
fadecd |
! if (did_throw)
|
|
Karsten Hopp |
fadecd |
discard_current_exception();
|
|
Karsten Hopp |
fadecd |
got_int = FALSE;
|
|
Karsten Hopp |
fadecd |
PyErr_SetNone(PyExc_KeyboardInterrupt);
|
|
Karsten Hopp |
fadecd |
return -1;
|
|
Karsten Hopp |
fadecd |
***************
|
|
Karsten Hopp |
fadecd |
*** 599,608 ****
|
|
Karsten Hopp |
fadecd |
/* Python exception is preferred over vim one; unlikely to occur though */
|
|
Karsten Hopp |
fadecd |
else if (PyErr_Occurred())
|
|
Karsten Hopp |
fadecd |
{
|
|
Karsten Hopp |
fadecd |
! if (current_exception != NULL)
|
|
Karsten Hopp |
fadecd |
! discard_current_exception();
|
|
Karsten Hopp |
fadecd |
! else
|
|
Karsten Hopp |
fadecd |
! need_rethrow = did_throw = FALSE;
|
|
Karsten Hopp |
fadecd |
return -1;
|
|
Karsten Hopp |
fadecd |
}
|
|
Karsten Hopp |
fadecd |
/* Finally transform VimL exception to python one */
|
|
Karsten Hopp |
fadecd |
--- 597,603 ----
|
|
Karsten Hopp |
fadecd |
/* Python exception is preferred over vim one; unlikely to occur though */
|
|
Karsten Hopp |
fadecd |
else if (PyErr_Occurred())
|
|
Karsten Hopp |
fadecd |
{
|
|
Karsten Hopp |
fadecd |
! discard_current_exception();
|
|
Karsten Hopp |
fadecd |
return -1;
|
|
Karsten Hopp |
fadecd |
}
|
|
Karsten Hopp |
fadecd |
/* Finally transform VimL exception to python one */
|
|
Karsten Hopp |
fadecd |
*** ../vim-7.4.160/src/version.c 2014-01-24 19:55:33.078220735 +0100
|
|
Karsten Hopp |
fadecd |
--- src/version.c 2014-01-31 14:46:39.127526894 +0100
|
|
Karsten Hopp |
fadecd |
***************
|
|
Karsten Hopp |
fadecd |
*** 740,741 ****
|
|
Karsten Hopp |
fadecd |
--- 740,743 ----
|
|
Karsten Hopp |
fadecd |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
fadecd |
+ /**/
|
|
Karsten Hopp |
fadecd |
+ 161,
|
|
Karsten Hopp |
fadecd |
/**/
|
|
Karsten Hopp |
fadecd |
|
|
Karsten Hopp |
fadecd |
--
|
|
Karsten Hopp |
fadecd |
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
Karsten Hopp |
fadecd |
|
|
Karsten Hopp |
fadecd |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
fadecd |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
fadecd |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
fadecd |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|