@@ -184,6 +184,9 @@ typedef PySliceObject PySliceObject_T;
184184# ifndef PyMapping_Keys
185185# define PyMapping_Keys py3_PyMapping_Keys
186186# endif
187+ # if PY_VERSION_HEX >= 0x030a00b2
188+ # define PyIter_Check py3_PyIter_Check
189+ # endif
187190# define PyIter_Next py3_PyIter_Next
188191# define PyObject_GetIter py3_PyObject_GetIter
189192# define PyObject_Repr py3_PyObject_Repr
@@ -358,6 +361,9 @@ static PyObject* (*py3_PyDict_GetItemString)(PyObject *, const char *);
358361static int (* py3_PyDict_Next )(PyObject * , Py_ssize_t * , PyObject * * , PyObject * * );
359362static PyObject * (* py3_PyLong_FromLong )(long );
360363static PyObject * (* py3_PyDict_New )(void );
364+ # if PY_VERSION_HEX >= 0x030a00b2
365+ static int (* py3_PyIter_Check )(PyObject * o );
366+ # endif
361367static PyObject * (* py3_PyIter_Next )(PyObject * );
362368static PyObject * (* py3_PyObject_GetIter )(PyObject * );
363369static PyObject * (* py3_PyObject_Repr )(PyObject * );
@@ -538,6 +544,9 @@ static struct
538544 {"PyDict_Next" , (PYTHON_PROC * )& py3_PyDict_Next },
539545 {"PyMapping_Check" , (PYTHON_PROC * )& py3_PyMapping_Check },
540546 {"PyMapping_Keys" , (PYTHON_PROC * )& py3_PyMapping_Keys },
547+ # if PY_VERSION_HEX >= 0x030a00b2
548+ {"PyIter_Check" , (PYTHON_PROC * )& py3_PyIter_Check },
549+ # endif
541550 {"PyIter_Next" , (PYTHON_PROC * )& py3_PyIter_Next },
542551 {"PyObject_GetIter" , (PYTHON_PROC * )& py3_PyObject_GetIter },
543552 {"PyObject_Repr" , (PYTHON_PROC * )& py3_PyObject_Repr },
@@ -671,6 +680,15 @@ py3_PyType_HasFeature(PyTypeObject *type, unsigned long feature)
671680# define PyType_HasFeature (t ,f ) py3_PyType_HasFeature(t,f)
672681# endif
673682
683+ # if PY_VERSION_HEX >= 0x030a00b2
684+ static inline int
685+ py3__PyObject_TypeCheck (PyObject * ob , PyTypeObject * type )
686+ {
687+ return Py_IS_TYPE (ob , type ) || PyType_IsSubtype (Py_TYPE (ob ), type );
688+ }
689+ # define _PyObject_TypeCheck (o ,t ) py3__PyObject_TypeCheck(o,t)
690+ # endif
691+
674692# ifdef MSWIN
675693/*
676694 * Look up the library "libname" using the InstallPath registry key.
0 commit comments