[Python-checkins] cpython: Issue #27809: builtin___build_class__() uses fast call
victor.stinner
python-checkins at python.org
Mon Aug 22 19:36:30 EDT 2016
https://hg.python.org/cpython/rev/620b2e554be4
changeset: 102853:620b2e554be4
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Aug 23 01:34:35 2016 +0200
summary:
Issue #27809: builtin___build_class__() uses fast call
files:
Python/bltinmodule.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -169,12 +169,8 @@
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);
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list