summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-01-16 22:52:00 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-01-16 22:52:00 (GMT)
commitd526cfe546d6401547981933c72884e94a0e7d1f (patch)
treeb751fce5d9b90c11be349a915a8d93acf3724308 /Objects
parent80ab22fa2c3b89efd9e1e17617d6f2ae755bbeaf (diff)
downloadcpython-d526cfe546d6401547981933c72884e94a0e7d1f.zip
cpython-d526cfe546d6401547981933c72884e94a0e7d1f.tar.gz
cpython-d526cfe546d6401547981933c72884e94a0e7d1f.tar.bz2
type_prepare() now uses fast call (METH_FASTCALL)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 05fc7b8..a521177 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,