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" {
45
45
#ifndef _PyObject_CAST
46
46
# define _PyObject_CAST (op ) PYCAPI_COMPAT_CAST(PyObject*, op)
47
47
#endif
48
- #ifndef _PyObject_CAST_CONST
49
- # define _PyObject_CAST_CONST (op ) PYCAPI_COMPAT_CAST(const PyObject*, op)
50
- #endif
51
48
52
49
53
50
// bpo-42262 added Py_NewRef() to Python 3.10.0a3
@@ -441,10 +438,10 @@ PyObject_GC_IsFinalized(PyObject *obj)
441
438
// bpo-39573 added Py_IS_TYPE() to Python 3.9.0a4
442
439
#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_IS_TYPE )
443
440
PYCAPI_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 ;
446
443
}
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)
448
445
#endif
449
446
450
447
You can’t perform that action at this time.
0 commit comments