8000 Whoops, cannot use DECREF_INPUTS() in some cases · python/cpython@394f2e0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 394f2e0

Browse files
committed
Whoops, cannot use DECREF_INPUTS() in some cases
1 parent 2b45efe commit 394f2e0

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Python/bytecodes.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -1949,7 +1949,7 @@ dummy_func(
19491949
else {
19501950
err = PyObject_IsTrue(cond);
19511951
if (err > 0) {
1952-
DECREF_INPUTS();
1952+
Py_DECREF(cond);
19531953
}
19541954
else if (err == 0) {
19551955
JUMPBY(oparg);
@@ -1978,7 +1978,7 @@ dummy_func(
19781978
jump = true;
19791979
}
19801980
else if (err == 0) {
1981-
DECREF_INPUTS();
1981+
Py_DECREF(cond);
19821982
}
19831983
else {
19841984
goto error;
@@ -2111,7 +2111,7 @@ dummy_func(
21112111
}
21122112
/* iterator ended normally */
21132113
assert(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg].op.code == END_FOR);
2114-
DECREF_INPUTS();
2114+
Py_DECREF(iter);
21152115
STACK_SHRINK(1);
21162116
/* Jump forward oparg, then skip following END_FOR instruction */
21172117
JUMPBY(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1);
@@ -2134,7 +2134,7 @@ dummy_func(
21342134
it->it_seq = NULL;
21352135
Py_DECREF(seq);
21362136
}
2137-
DECREF_INPUTS();
2137+
Py_DECREF(iter);
21382138
STACK_SHRINK(1);
21392139
/* Jump forward oparg, then skip following END_FOR instruction */
21402140
JUMPBY(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1);
@@ -2157,7 +2157,7 @@ dummy_func(
21572157
it->it_seq = NULL;
21582158
Py_DECREF(seq);
21592159
}
2160-
DECREF_INPUTS();
2160+
Py_DECREF(iter);
21612161
STACK_SHRINK(1);
21622162
/* Jump forward oparg, then skip following END_FOR instruction */
21632163
JUMPBY(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1);

Python/generated_cases.c.h

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0