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/if_python3.c | |
| parent | 1ae8c262df7083dfb4b41485508951c50eccc84c (diff) | |
| download | vim-git-fee511c1d39ecd155e27545cf70aeaa99d31b215.tar.gz | |
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/if_python3.c')
| -rw-r--r-- | src/if_python3.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/if_python3.c b/src/if_python3.c index 0b05857d5..1de8fe8d2 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 |
