Issue #27809: builtin___build_class__() uses fast call

This commit is contained in:
Victor Stinner 2016-08-23 01:34:35 +02:00
parent 6e2333dfdf
commit d1c2a8e2b5
1 changed files with 2 additions and 6 deletions

View File

@ -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);