Skip to content

Commit 63e3c03

Browse files
Fix casting incompatibility
Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent c392b13 commit 63e3c03

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Include/boolobject.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ extern "C" {
1212
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 16)
1313
PyAPI_FUNC(int) PyBool_Check(PyObject *x);
1414
#endif
15-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x03100000
15+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < _Py_PACK_VERSION(3, 16)
1616
# define PyBool_Check(x) Py_IS_TYPE((x), &PyBool_Type)
17+
#else
18+
# define PyBool_Check(x) PyBool_Check(_PyObject_CAST(x))
1719
#endif
1820

1921
/* Py_False and Py_True are the only two bools in existence. */

0 commit comments

Comments
 (0)