mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Patch #427190: Implement and use METH_NOARGS and METH_O.
This commit is contained in:
parent
c35422109b
commit
e3eb1f2b23
17 changed files with 429 additions and 551 deletions
|
@ -376,12 +376,10 @@ mro_implementation(PyTypeObject *type)
|
|||
}
|
||||
|
||||
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 @@ type_dealloc(PyTypeObject *type)
|
|||
}
|
||||
|
||||
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}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue