Patch #427190: Implement and use METH_NOARGS and METH_O.
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index c4dc364..f7f2c97 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -376,12 +376,10 @@
}
static PyObject *
-mro_external(PyObject *self, PyObject *args)
+mro_external(PyObject *self)
{
PyTypeObject *type = (PyTypeObject *)self;
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
return mro_implementation(type);
}
@@ -845,7 +843,7 @@
}
static PyMethodDef type_methods[] = {
- {"mro", mro_external, METH_VARARGS,
+ {"mro", (PyCFunction)mro_external, METH_NOARGS,
"mro() -> list\nreturn a type's method resolution order"},
{0}
};