diff options
author | Zdenek Dohnal <zdohnal@redhat.com> | 2022-06-27 13:59:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-27 13:59:00 +0100 |
commit | fee511c1d39ecd155e27545cf70aeaa99d31b215 (patch) | |
tree | 55af7607448423902d5dd89ad0d478c82eb95504 /src | |
parent | 1ae8c262df7083dfb4b41485508951c50eccc84c (diff) |
patch 8.2.5168: cannot build with Python 3.11v8.2.5168
Problem: Cannot build with Python 3.11.
Solution: Adjust define for _PyObject_TypeCheck. (Zdenek Dohnal,
closes #10627)
Diffstat (limited to 'src')
-rw-r--r-- | src/if_python3.c | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 1 deletions
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 @@ -736,6 +736,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 5168, +/**/ 5167, /**/ 5166, |