# HG changeset patch # User Bram Moolenaar # Date 1656334803 -7200 # Node ID b15485413b9a8b3a5fe792bee2cba10344391be7 # Parent 8b8aafbda944999003dc6981542d36c0bd3dda5e patch 8.2.5168: cannot build with Python 3.11 Commit: https://github.com/vim/vim/commit/fee511c1d39ecd155e27545cf70aeaa99d31b215 Author: Zdenek Dohnal Date: Mon Jun 27 13:59:00 2022 +0100 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 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -692,7 +692,12 @@ py3__PyObject_TypeCheck(PyObject *ob, Py { 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 --- a/src/version.c +++ b/src/version.c @@ -736,6 +736,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 5168, +/**/ 5167, /**/ 5166,