diff --git a/Python/ceval.c b/Python/ceval.c index b3a0a3640eb97d..ae16c96c3c6f4c 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2647,13 +2647,10 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int } TARGET(BUILD_TUPLE) { - PyObject *tup = PyTuple_New(oparg); + STACK_SHRINK(oparg); + PyObject *tup = _PyTuple_FromArraySteal(stack_pointer, oparg); if (tup == NULL) goto error; - while (--oparg >= 0) { - PyObject *item = POP(); - PyTuple_SET_ITEM(tup, oparg, item); - } PUSH(tup); DISPATCH(); }