Home | History | Annotate | Download | only in Objects

Lines Matching defs: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.
495 PyObject* mro;
497 "", 2, 2, &cls, &mro);
498 Py_INCREF(mro);
500 cls->tp_mro = mro;
1130 PyObject *mro;
1135 mro = a->tp_mro;
1136 if (mro != NULL) {
1138 by walking the MRO tuple */
1140 assert(PyTuple_Check(mro));
1141 n = PyTuple_GET_SIZE(mro);
1143 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
1290 fill_classic_mro(PyObject *mro, PyObject *cls)
1295 assert(PyList_Check(mro));
1297 i = PySequence_Contains(mro, cls);
1301 if (PyList_Append(mro, cls) < 0)
1309 if (fill_classic_mro(mro, base) < 0)
1318 PyObject *mro;
1321 mro = PyList_New(0);
1322 if (mro != NULL) {
1323 if (fill_classic_mro(mro, cls) == 0)
1324 return mro;
1325 Py_DECREF(mro);
1345 If A precedes B in C's MRO, then A will precede B in the MRO of all
1349 The MRO of a class must be an extension without reordering of the
1350 MRO of each of its superclasses.
1412 /* Raise a TypeError for an MRO order disagreement.
1416 to be put next into the MRO. There is some conflict between the
1417 order in which they should be put in the MRO, but it's hard to
1444 consistent method resolution\norder (MRO) for bases");
1490 /* Choose next candidate for MRO.
1493 If not, choose the class which appears in the MRO
1614 PyObject *mro, *result, *tuple;
1623 mro = lookup_method((PyObject *)type, "mro", &mro_str);
1624 if (mro == NULL)
1626 result = PyObject_CallObject(mro, NULL);
1627 Py_DECREF(mro);
1651 "mro() returned a non-class ('%.500s')",
1659 "mro() returned base with unsuitable layout ('%.500s')",
1670 from the custom MRO */
2462 /* Internal API to look for a name through the MRO.
2468 PyObject *mro, *res, *base, *dict;
2480 /* Look in tp_dict of types in MRO */
2481 mro = type->tp_mro;
2483 /* If mro is NULL, the type is either not yet initialized
2486 if (mro == NULL)
2490 assert(PyTuple_Check(mro));
2491 n = PyTuple_GET_SIZE(mro);
2493 base = PyTuple_GET_ITEM(mro, i);
2663 {"mro", (PyCFunction)mro_external, METH_NOARGS,
2664 PyDoc_STR("mro() -> list\nreturn a type's method resolution order")},
6152 __new__ in the MRO which will call tp_new_wrapper
6471 PyObject *mro, *res, *tmp, *dict;
6477 mro = starttype->tp_mro;
6479 if (mro == NULL)
6482 assert(PyTuple_Check(mro));
6483 n = PyTuple_GET_SIZE(mro);
6486 if ((PyObject *)(su->type) == PyTuple_GET_ITEM(mro, i))
6492 tmp = PyTuple_GET_ITEM(mro, i);