(original) (raw)

changeset: 102853:620b2e554be4 user: Victor Stinner victor.stinner@gmail.com date: Tue Aug 23 01:34:35 2016 +0200 files: Python/bltinmodule.c description: Issue #27809: builtin___build_class__() uses fast call diff -r bf2d88cf039a -r 620b2e554be4 Python/bltinmodule.c --- a/Python/bltinmodule.c Tue Aug 23 00:25:01 2016 +0200 +++ b/Python/bltinmodule.c Tue Aug 23 01:34:35 2016 +0200 @@ -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); /victor.stinner@gmail.com