File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,6 @@ extern "C" {
4545#ifndef _PyObject_CAST
4646# define _PyObject_CAST (op ) PYCAPI_COMPAT_CAST(PyObject*, op)
4747#endif
48- #ifndef _PyObject_CAST_CONST
49- # define _PyObject_CAST_CONST (op ) PYCAPI_COMPAT_CAST(const PyObject*, op)
50- #endif
5148
5249
5350// bpo-42262 added Py_NewRef() to Python 3.10.0a3
@@ -441,10 +438,10 @@ PyObject_GC_IsFinalized(PyObject *obj)
441438// bpo-39573 added Py_IS_TYPE() to Python 3.9.0a4
442439#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_IS_TYPE )
443440PYCAPI_COMPAT_STATIC_INLINE (int )
444- _Py_IS_TYPE (const PyObject * ob , const PyTypeObject * type ) {
445- return ob -> ob_type == type ;
441+ _Py_IS_TYPE (PyObject * ob , PyTypeObject * type ) {
442+ return Py_TYPE ( ob ) == type ;
446443}
447- #define Py_IS_TYPE (ob , type ) _Py_IS_TYPE(_PyObject_CAST_CONST (ob), type)
444+ #define Py_IS_TYPE (ob , type ) _Py_IS_TYPE(_PyObject_CAST (ob), type)
448445#endif
449446
450447
You can’t perform that action at this time.
0 commit comments