summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-08-22 23:34:35 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-08-22 23:34:35 (GMT)
commitd1c2a8e2b5d285f26f1a3c6d787d148a7c3b04de (patch)
tree9d99c3a8b519a255a33be5224157dd665224845b /Python
parent6e2333dfdf54f052fcf404086141e820da3af8fb (diff)
downloadcpython-d1c2a8e2b5d285f26f1a3c6d787d148a7c3b04de.zip
cpython-d1c2a8e2b5d285f26f1a3c6d787d148a7c3b04de.tar.gz
cpython-d1c2a8e2b5d285f26f1a3c6d787d148a7c3b04de.tar.bz2
Issue #27809: builtin___build_class__() uses fast call
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index b22867e..00a85b5 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);