From d526cfe546d6401547981933c72884e94a0e7d1f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 16 Jan 2017 23:52:00 +0100 Subject: [PATCH] type_prepare() now uses fast call (METH_FASTCALL) --- Objects/typeobject.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 05fc7b88d3f..a5211772103 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -3112,7 +3112,8 @@ type_subclasses(PyTypeObject *type, PyObject *args_ignored) } static PyObject * -type_prepare(PyObject *self, PyObject *args, PyObject *kwds) +type_prepare(PyObject *self, PyObject **args, Py_ssize_t nargs, + PyObject *kwnames) { return PyDict_New(); } @@ -3216,7 +3217,7 @@ static PyMethodDef type_methods[] = { {"__subclasses__", (PyCFunction)type_subclasses, METH_NOARGS, PyDoc_STR("__subclasses__() -> list of immediate subclasses")}, {"__prepare__", (PyCFunction)type_prepare, - METH_VARARGS | METH_KEYWORDS | METH_CLASS, + METH_FASTCALL | METH_CLASS, PyDoc_STR("__prepare__() -> dict\n" "used to create the namespace for the class statement")}, {"__instancecheck__", type___instancecheck__, METH_O,