Skip to content

Commit eec2fcc

Browse files
committed
Whoops, cannot use DECREF_INPUTS() in some cases
1 parent 16b8406 commit eec2fcc

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Python/bytecodes.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ dummy_func(
19401940
else {
19411941
err = PyObject_IsTrue(cond);
19421942
if (err > 0) {
1943-
DECREF_INPUTS();
1943+
Py_DECREF(cond);
19441944
}
19451945
else if (err == 0) {
19461946
JUMPBY(oparg);
@@ -1969,7 +1969,7 @@ dummy_func(
19691969
jump = true;
19701970
}
19711971
else if (err == 0) {
1972-
DECREF_INPUTS();
1972+
Py_DECREF(cond);
19731973
}
19741974
else {
19751975
goto error;
@@ -2102,7 +2102,7 @@ dummy_func(
21022102
}
21032103
/* iterator ended normally */
21042104
assert(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg].op.code == END_FOR);
2105-
DECREF_INPUTS();
2105+
Py_DECREF(iter);
21062106
STACK_SHRINK(1);
21072107
/* Jump forward oparg, then skip following END_FOR instruction */
21082108
JUMPBY(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1);
@@ -2125,7 +2125,7 @@ dummy_func(
21252125
it->it_seq = NULL;
21262126
Py_DECREF(seq);
21272127
}
2128-
DECREF_INPUTS();
2128+
Py_DECREF(iter);
21292129
STACK_SHRINK(1);
21302130
/* Jump forward oparg, then skip following END_FOR instruction */
21312131
JUMPBY(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1);
@@ -2148,7 +2148,7 @@ dummy_func(
21482148
it->it_seq = NULL;
21492149
Py_DECREF(seq);
21502150
}
2151-
DECREF_INPUTS();
2151+
Py_DECREF(iter);
21522152
STACK_SHRINK(1);
21532153
/* Jump forward oparg, then skip following END_FOR instruction */
21542154
JUMPBY(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1);

Python/generated_cases.c.h

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

0 commit comments

Comments
 (0)