Kaydet (Commit) d1c2a8e2 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #27809: builtin___build_class__() uses fast call

üst 6e2333df
...@@ -169,12 +169,8 @@ builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds) ...@@ -169,12 +169,8 @@ builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds)
NULL, 0, NULL, 0, NULL, 0, NULL, NULL, 0, NULL, 0, NULL, 0, NULL,
PyFunction_GET_CLOSURE(func)); PyFunction_GET_CLOSURE(func));
if (cell != NULL) { if (cell != NULL) {
PyObject *margs; PyObject *margs[3] = {name, bases, ns};
margs = PyTuple_Pack(3, name, bases, ns); cls = _PyObject_FastCallDict(meta, margs, 3, mkw);
if (margs != NULL) {
cls = PyEval_CallObjectWithKeywords(meta, margs, mkw);
Py_DECREF(margs);
}
if (cls != NULL && PyCell_Check(cell)) if (cls != NULL && PyCell_Check(cell))
PyCell_Set(cell, cls); PyCell_Set(cell, cls);
Py_DECREF(cell); Py_DECREF(cell);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment