summaryrefslogtreecommitdiff
path: root/src/if_python3.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-07-01 22:03:04 +0200
committerBram Moolenaar <Bram@vim.org>2013-07-01 22:03:04 +0200
commit41009374747d68a12d043bcca0ae649d0c18daf4 (patch)
treee05985bb9262965f6c4ea9a4ddde724be7b89084 /src/if_python3.c
parentc33916a6e06db94ea1a3dfd35eee32ca80787ec5 (diff)
downloadvim-41009374747d68a12d043bcca0ae649d0c18daf4.zip
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)
Diffstat (limited to 'src/if_python3.c')
-rw-r--r--src/if_python3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index badf015c2..6849f1fb1 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);