Skip to content

Commit

Permalink
patch 8.2.5168: cannot build with Python 3.11
Browse files Browse the repository at this point in the history
Problem:    Cannot build with Python 3.11.
Solution:   Adjust define for _PyObject_TypeCheck. (Zdenek Dohnal,
            closes #10627)
  • Loading branch information
zdohnal authored and brammool committed Jun 27, 2022
1 parent 1ae8c26 commit fee511c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/if_python3.c
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -735,6 +735,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
5168,
/**/
5167,
/**/
Expand Down

0 comments on commit fee511c

Please sign in to comment.