Mercurial > vim
changeset 29303:b15485413b9a v8.2.5168
patch 8.2.5168: cannot build with Python 3.11
Commit: https://github.com/vim/vim/commit/fee511c1d39ecd155e27545cf70aeaa99d31b215
Author: Zdenek Dohnal <zdohnal@redhat.com>
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 27 Jun 2022 15:00:03 +0200 |
parents | 8b8aafbda944 |
children | 584ebb01e999 |
files | src/if_python3.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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