Skip to content

Commit a7d55c3

Browse files
committed
Fix usage of PyStackRef_FromPyObjectSteal in CALL_TUPLE_1
This was missed in pythongh-124894
1 parent b9c6f4e commit a7d55c3

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3669,11 +3669,12 @@ dummy_func(
36693669
DEOPT_IF(!PyStackRef_IsNull(null));
36703670
DEOPT_IF(callable_o != (PyObject *)&PyTuple_Type);
36713671
STAT_INC(CALL, hit);
3672-
res = PyStackRef_FromPyObjectSteal(PySequence_Tuple(arg_o));
3672+
PyObject *res_o = PySequence_Tuple(arg_o);
36733673
DEAD(null);
36743674
DEAD(callable);
36753675
PyStackRef_CLOSE(arg);
3676-
ERROR_IF(PyStackRef_IsNull(res), error);
3676+
ERROR_IF(res_o == NULL, error);
3677+
res = PyStackRef_FromPyObjectSteal(res_o);
36773678
}
36783679

36793680
macro(CALL_TUPLE_1) =

Python/executor_cases.c.h

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)