diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-15 14:51:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-15 14:51:35 +0200 |
commit | 03db85b398746a252345ed8a7da69f0f2591e932 (patch) | |
tree | 7ed0344aa301a35ff620990e64264250182e06fd /src/if_python.c | |
parent | b6c589a529bc8c5720477494696c6f69fe457475 (diff) | |
download | vim-03db85b398746a252345ed8a7da69f0f2591e932.zip |
updated for version 7.3.948
Problem: Cannot build with Python 2.2
Solution: Make Python interface work with Python 2.2
Make 2.2 the first supported version. (ZyX)
Diffstat (limited to 'src/if_python.c')
-rw-r--r-- | src/if_python.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/if_python.c b/src/if_python.c index 56db2b273..575f82200 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -229,6 +229,7 @@ struct PyMethodDef { Py_ssize_t a; }; # define _Py_TrueStruct (*dll__Py_TrueStruct) # define PyObject_Init dll__PyObject_Init # define PyObject_GetIter dll_PyObject_GetIter +# define PyObject_IsTrue dll_PyObject_IsTrue # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02020000 # define PyType_IsSubtype dll_PyType_IsSubtype # endif @@ -324,6 +325,7 @@ static int(*dll_Py_IsInitialized)(void); static PyObject*(*dll__PyObject_New)(PyTypeObject *, PyObject *); static PyObject*(*dll__PyObject_Init)(PyObject *, PyTypeObject *); static PyObject* (*dll_PyObject_GetIter)(PyObject *); +static int (*dll_PyObject_IsTrue)(PyObject *); # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000 static iternextfunc dll__PyObject_NextNotImplemented; # endif @@ -459,6 +461,7 @@ static struct {"_PyObject_New", (PYTHON_PROC*)&dll__PyObject_New}, {"PyObject_Init", (PYTHON_PROC*)&dll__PyObject_Init}, {"PyObject_GetIter", (PYTHON_PROC*)&dll_PyObject_GetIter}, + {"PyObject_IsTrue", (PYTHON_PROC*)&dll_PyObject_IsTrue}, # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000 {"_PyObject_NextNotImplemented", (PYTHON_PROC*)&dll__PyObject_NextNotImplemented}, # endif @@ -787,7 +790,10 @@ Python_Init(void) * so the following does both: unlock GIL and save thread state in TLS * without deleting thread state */ - PyEval_SaveThread(); +#ifndef PY_CAN_RECURSE + saved_python_thread = +#endif + PyEval_SaveThread(); initialised = 1; } |