Lines Matching refs:metaclass
4941 PyObject *metaclass = NULL, *result, *base;
4944 metaclass = PyDict_GetItemString(methods, "__metaclass__");
4945 if (metaclass != NULL)
4946 Py_INCREF(metaclass);
4949 metaclass = PyObject_GetAttrString(base, "__class__");
4950 if (metaclass == NULL) {
4952 metaclass = (PyObject *)base->ob_type;
4953 Py_INCREF(metaclass);
4959 metaclass = PyDict_GetItemString(g, "__metaclass__");
4960 if (metaclass == NULL)
4961 metaclass = (PyObject *) &PyClass_Type;
4962 Py_INCREF(metaclass);
4964 result = PyObject_CallFunctionObjArgs(metaclass, name, bases, methods,
4966 Py_DECREF(metaclass);
4979 "Error when calling the metaclass bases\n"