diff options
-rw-r--r-- | src/if_python.c | 5 | ||||
-rw-r--r-- | src/if_python3.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/if_python.c b/src/if_python.c index 8a459fd43..1c1924549 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -149,6 +149,7 @@ struct PyMethodDef { Py_ssize_t a; }; # define PyMem_Malloc dll_PyMem_Malloc # define PyDict_SetItemString dll_PyDict_SetItemString # define PyErr_BadArgument dll_PyErr_BadArgument +# define PyErr_NewException dll_PyErr_NewException # define PyErr_Clear dll_PyErr_Clear # define PyErr_PrintEx dll_PyErr_PrintEx # define PyErr_NoMemory dll_PyErr_NoMemory @@ -255,6 +256,7 @@ static int(*dll_PyMem_Free)(void *); static void* (*dll_PyMem_Malloc)(size_t); static int(*dll_PyDict_SetItemString)(PyObject *dp, char *key, PyObject *item); static int(*dll_PyErr_BadArgument)(void); +static PyObject *(*dll_PyErr_NewException)(char *, PyObject *, PyObject *); static void(*dll_PyErr_Clear)(void); static void(*dll_PyErr_PrintEx)(int); static PyObject*(*dll_PyErr_NoMemory)(void); @@ -391,6 +393,7 @@ static struct {"PyMem_Malloc", (PYTHON_PROC*)&dll_PyMem_Malloc}, {"PyDict_SetItemString", (PYTHON_PROC*)&dll_PyDict_SetItemString}, {"PyErr_BadArgument", (PYTHON_PROC*)&dll_PyErr_BadArgument}, + {"PyErr_NewException", (PYTHON_PROC*)&dll_PyErr_NewException}, {"PyErr_Clear", (PYTHON_PROC*)&dll_PyErr_Clear}, {"PyErr_PrintEx", (PYTHON_PROC*)&dll_PyErr_PrintEx}, {"PyErr_NoMemory", (PYTHON_PROC*)&dll_PyErr_NoMemory}, @@ -1304,7 +1307,7 @@ PythonMod_Init(void) mod = Py_InitModule4("vim", VimMethods, (char *)NULL, (PyObject *)NULL, PYTHON_API_VERSION); dict = PyModule_GetDict(mod); - VimError = Py_BuildValue("s", "vim.error"); + VimError = PyErr_NewException("vim.error", NULL, NULL); PyDict_SetItemString(dict, "error", VimError); PyDict_SetItemString(dict, "buffers", (PyObject *)(void *)&TheBufferMap); diff --git a/src/if_python3.c b/src/if_python3.c index 02da1b0c4..2f98a0462 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -1606,8 +1606,8 @@ Py3Init_vim(void) return NULL; VimError = PyErr_NewException("vim.error", NULL, NULL); - Py_INCREF(VimError); + Py_INCREF(VimError); PyModule_AddObject(mod, "error", VimError); Py_INCREF((PyObject *)(void *)&TheBufferMap); PyModule_AddObject(mod, "buffers", (PyObject *)(void *)&TheBufferMap); diff --git a/src/version.c b/src/version.c index 7b283f18e..5e472cb7c 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 953, +/**/ 952, /**/ 951, |