From 8661b17843d95866dedfa0f4fbfec2278ee010be Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 15 May 2013 15:44:28 +0200 Subject: =?UTF-8?q?updated=20for=20version=207.3.951=20Problem:=20=20=20?= =?UTF-8?q?=20Python=20exceptions=20have=20problems.=20Solution:=20=20=20C?= =?UTF-8?q?hange=20some=20IndexErrors=20to=20TypeErrors.=20Make=20?= =?UTF-8?q?=E2=80=9Cline=20number=20out=20of=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20range=E2=80=9D=20an=20IndexError.=20=20Make=20?= =?UTF-8?q?=E2=80=9Cunable=20to=20get=20option=20value=E2=80=9D=20a=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20RuntimeError.=20Make=20all=20P?= =?UTF-8?q?yErr=5FSetString=20messages=20start=20with=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20lowercase=20letter=20and=20use=20=5F().=20(Zy?= =?UTF-8?q?X)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/if_python.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/if_python.c') diff --git a/src/if_python.c b/src/if_python.c index edbba2133..8a459fd43 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -358,6 +358,7 @@ static PyObject *imp_PyExc_KeyError; static PyObject *imp_PyExc_KeyboardInterrupt; static PyObject *imp_PyExc_TypeError; static PyObject *imp_PyExc_ValueError; +static PyObject *imp_PyExc_RuntimeError; # define PyExc_AttributeError imp_PyExc_AttributeError # define PyExc_IndexError imp_PyExc_IndexError @@ -365,6 +366,7 @@ static PyObject *imp_PyExc_ValueError; # define PyExc_KeyboardInterrupt imp_PyExc_KeyboardInterrupt # define PyExc_TypeError imp_PyExc_TypeError # define PyExc_ValueError imp_PyExc_ValueError +# define PyExc_RuntimeError imp_PyExc_RuntimeError /* * Table of name to function pointer of python. @@ -593,12 +595,14 @@ get_exceptions(void) imp_PyExc_KeyboardInterrupt = PyDict_GetItemString(exdict, "KeyboardInterrupt"); imp_PyExc_TypeError = PyDict_GetItemString(exdict, "TypeError"); imp_PyExc_ValueError = PyDict_GetItemString(exdict, "ValueError"); + imp_PyExc_RuntimeError = PyDict_GetItemString(exdict, "RuntimeError"); Py_XINCREF(imp_PyExc_AttributeError); Py_XINCREF(imp_PyExc_IndexError); Py_XINCREF(imp_PyExc_KeyError); Py_XINCREF(imp_PyExc_KeyboardInterrupt); Py_XINCREF(imp_PyExc_TypeError); Py_XINCREF(imp_PyExc_ValueError); + Py_XINCREF(imp_PyExc_RuntimeError); Py_XDECREF(exmod); } #endif /* DYNAMIC_PYTHON */ -- cgit v1.2.1