Lines Matching refs:mro
58 classes, mro, or attributes of the type are altered.
98 Check that all base classes or elements of the mro of type are
100 classes or mro of the type are altered.
104 appears in the MRO of a new-style class. No support either for
109 each subclass when their mro is recursively updated.
501 PyObject* mro;
503 "", 2, 2, &cls, &mro);
504 Py_INCREF(mro);
506 cls->tp_mro = mro;
1148 PyObject *mro;
1153 mro = a->tp_mro;
1154 if (mro != NULL) {
1156 by walking the MRO tuple */
1158 assert(PyTuple_Check(mro));
1159 n = PyTuple_GET_SIZE(mro);
1161 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
1308 fill_classic_mro(PyObject *mro, PyObject *cls)
1313 assert(PyList_Check(mro));
1315 i = PySequence_Contains(mro, cls);
1319 if (PyList_Append(mro, cls) < 0)
1327 if (fill_classic_mro(mro, base) < 0)
1336 PyObject *mro;
1339 mro = PyList_New(0);
1340 if (mro != NULL) {
1341 if (fill_classic_mro(mro, cls) == 0)
1342 return mro;
1343 Py_DECREF(mro);
1363 If A precedes B in C's MRO, then A will precede B in the MRO of all
1367 The MRO of a class must be an extension without reordering of the
1368 MRO of each of its superclasses.
1430 /* Raise a TypeError for an MRO order disagreement.
1434 to be put next into the MRO. There is some conflict between the
1435 order in which they should be put in the MRO, but it's hard to
1462 consistent method resolution\norder (MRO) for bases");
1508 /* Choose next candidate for MRO.
1511 If not, choose the class which appears in the MRO
1632 PyObject *mro, *result, *tuple;
1641 mromro", &mro_str);
1642 if (mro == NULL)
1644 result = PyObject_CallObject(mro, NULL);
1645 Py_DECREF(mro);
1669 "mro() returned a non-class ('%.500s')",
1677 "mro() returned base with unsuitable layout ('%.500s')",
1688 from the custom MRO */
2482 /* Internal API to look for a name through the MRO.
2488 PyObject *mro, *res, *base, *dict;
2500 /* Look in tp_dict of types in MRO */
2501 mro = type->tp_mro;
2503 /* If mro is NULL, the type is either not yet initialized
2506 if (mro == NULL)
2510 assert(PyTuple_Check(mro));
2511 n = PyTuple_GET_SIZE(mro);
2513 base = PyTuple_GET_ITEM(mro, i);
2690 {"mro", (PyCFunction)mro_external, METH_NOARGS,
2691 PyDoc_STR("mro() -> list\nreturn a type's method resolution order")},
6203 __new__ in the MRO which will call tp_new_wrapper
6507 PyObject *mro, *res, *tmp, *dict;
6513 mro = starttype->tp_mro;
6515 if (mro == NULL)
6518 assert(PyTuple_Check(mro));
6519 n = PyTuple_GET_SIZE(mro);
6522 if ((PyObject *)(su->type) == PyTuple_GET_ITEM(mro, i))
6528 tmp = PyTuple_GET_ITEM(mro, i);