From: Zdenek Dohnal Date: Mon, 27 Jun 2022 12:59:00 +0000 (+0100) Subject: patch 8.2.5168: cannot build with Python 3.11 X-Git-Tag: v8.2.5168 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fee511c1d39ecd155e27545cf70aeaa99d31b215;p=thirdparty%2Fvim.git patch 8.2.5168: cannot build with Python 3.11 Problem: Cannot build with Python 3.11. Solution: Adjust define for _PyObject_TypeCheck. (Zdenek Dohnal, closes #10627) --- diff --git a/src/if_python3.c b/src/if_python3.c index 0b05857d5a..1de8fe8d20 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -692,7 +692,12 @@ py3__PyObject_TypeCheck(PyObject *ob, PyTypeObject *type) { return Py_IS_TYPE(ob, type) || PyType_IsSubtype(Py_TYPE(ob), type); } -# define _PyObject_TypeCheck(o,t) py3__PyObject_TypeCheck(o,t) +# if PY_VERSION_HEX >= 0x030b00b3 +# undef PyObject_TypeCheck +# define PyObject_TypeCheck(o,t) py3__PyObject_TypeCheck(o,t) +# else +# define _PyObject_TypeCheck(o,t) py3__PyObject_TypeCheck(o,t) +# endif # endif # ifdef MSWIN diff --git a/src/version.c b/src/version.c index d9dba16a73..5ac1cb93d0 100644 --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 5168, /**/ 5167, /**/