From 41009374747d68a12d043bcca0ae649d0c18daf4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 1 Jul 2013 22:03:04 +0200 Subject: updated for version 7.3.1287 Problem: Python SystemExit exception is not handled properly. Solution: Catch the exception and give an error. (Yasuhiro Matsumoto, Ken Takata) --- src/if_python3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/if_python3.c') diff --git a/src/if_python3.c b/src/if_python3.c index badf015c20..6849f1fb10 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -126,7 +126,6 @@ # define PyErr_PrintEx py3_PyErr_PrintEx # define PyErr_NoMemory py3_PyErr_NoMemory # define PyErr_Occurred py3_PyErr_Occurred -# define PyErr_PrintEx py3_PyErr_PrintEx # define PyErr_SetNone py3_PyErr_SetNone # define PyErr_SetString py3_PyErr_SetString # define PyErr_SetObject py3_PyErr_SetObject @@ -403,6 +402,7 @@ static PyObject *p3imp_PyExc_KeyError; static PyObject *p3imp_PyExc_KeyboardInterrupt; static PyObject *p3imp_PyExc_TypeError; static PyObject *p3imp_PyExc_ValueError; +static PyObject *p3imp_PyExc_SystemExit; static PyObject *p3imp_PyExc_RuntimeError; static PyObject *p3imp_PyExc_ImportError; static PyObject *p3imp_PyExc_OverflowError; @@ -413,6 +413,7 @@ static PyObject *p3imp_PyExc_OverflowError; # define PyExc_KeyboardInterrupt p3imp_PyExc_KeyboardInterrupt # define PyExc_TypeError p3imp_PyExc_TypeError # define PyExc_ValueError p3imp_PyExc_ValueError +# define PyExc_SystemExit p3imp_PyExc_SystemExit # define PyExc_RuntimeError p3imp_PyExc_RuntimeError # define PyExc_ImportError p3imp_PyExc_ImportError # define PyExc_OverflowError p3imp_PyExc_OverflowError @@ -681,6 +682,7 @@ get_py3_exceptions() p3imp_PyExc_KeyboardInterrupt = PyDict_GetItemString(exdict, "KeyboardInterrupt"); p3imp_PyExc_TypeError = PyDict_GetItemString(exdict, "TypeError"); p3imp_PyExc_ValueError = PyDict_GetItemString(exdict, "ValueError"); + p3imp_PyExc_SystemExit = PyDict_GetItemString(exdict, "SystemExit"); p3imp_PyExc_RuntimeError = PyDict_GetItemString(exdict, "RuntimeError"); p3imp_PyExc_ImportError = PyDict_GetItemString(exdict, "ImportError"); p3imp_PyExc_OverflowError = PyDict_GetItemString(exdict, "OverflowError"); @@ -690,6 +692,7 @@ get_py3_exceptions() Py_XINCREF(p3imp_PyExc_KeyboardInterrupt); Py_XINCREF(p3imp_PyExc_TypeError); Py_XINCREF(p3imp_PyExc_ValueError); + Py_XINCREF(p3imp_PyExc_SystemExit); Py_XINCREF(p3imp_PyExc_RuntimeError); Py_XINCREF(p3imp_PyExc_ImportError); Py_XINCREF(p3imp_PyExc_OverflowError); -- cgit v1.2.3