PyAPI_FUNC(PyObject *) _PyType_InitSubclasses(PyTypeObject *);
extern PyObject * _PyType_GetBases(PyTypeObject *type);
-extern PyObject * _PyType_GetMRO(PyTypeObject *type);
extern PyObject* _PyType_GetSubclasses(PyTypeObject *);
extern int _PyType_HasSubclasses(PyTypeObject *);
return self->tp_mro;
}
-PyObject *
-_PyType_GetMRO(PyTypeObject *self)
-{
-#ifdef Py_GIL_DISABLED
- PyObject *mro = _Py_atomic_load_ptr_relaxed(&self->tp_mro);
- if (mro == NULL) {
- return NULL;
- }
- if (_Py_TryIncrefCompare(&self->tp_mro, mro)) {
- return mro;
- }
-
- BEGIN_TYPE_LOCK();
- mro = lookup_tp_mro(self);
- Py_XINCREF(mro);
- END_TYPE_LOCK();
- return mro;
-#else
- return Py_XNewRef(lookup_tp_mro(self));
-#endif
-}
-
static inline void
set_tp_mro(PyTypeObject *self, PyObject *mro, int initial)
{