summaryrefslogtreecommitdiff
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-08-23 01:34:35 +0200
committerVictor Stinner <victor.stinner@gmail.com>2016-08-23 01:34:35 +0200
commitd86599444bdef5e88d1154b487ea1f011181ae30 (patch)
treeeadf9400359e21f684a9e5eb6bce987fd163867e /Python/bltinmodule.c
parent2106b8b6a210490c36471334570461db73cfddee (diff)
downloadcpython-d86599444bdef5e88d1154b487ea1f011181ae30.tar.gz
Issue #27809: builtin___build_class__() uses fast call
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index b22867eb07..00a85b5741 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -169,12 +169,8 @@ builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds)
NULL, 0, NULL, 0, NULL, 0, NULL,
PyFunction_GET_CLOSURE(func));
if (cell != NULL) {
- PyObject *margs;
- margs = PyTuple_Pack(3, name, bases, ns);
- if (margs != NULL) {
- cls = PyEval_CallObjectWithKeywords(meta, margs, mkw);
- Py_DECREF(margs);
- }
+ PyObject *margs[3] = {name, bases, ns};
+ cls = _PyObject_FastCallDict(meta, margs, 3, mkw);
if (cls != NULL && PyCell_Check(cell))
PyCell_Set(cell, cls);
Py_DECREF(cell);