File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1025,7 +1025,11 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
1025
1025
PUSH (retval ); /* we are back from a function call */
1026
1026
}
1027
1027
else {
1028
- if (f -> f_execute == slp_eval_frame_iter ) {
1028
+ if (f -> f_execute == slp_eval_frame_noval ) {
1029
+ /* don't push it, frame ignores value */
1030
+ Py_XDECREF (retval );
1031
+ }
1032
+ else if (f -> f_execute == slp_eval_frame_iter ) {
1029
1033
/* finalise the for_iter operation */
1030
1034
NEXTOPARG ();
1031
1035
if (opcode == EXTENDED_ARG ) {
@@ -1096,14 +1100,9 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
1096
1100
/*f->f_execute = PyEval_EvalFrame_value;
1097
1101
PREDICT(WITH_CLEANUP_FINISH); */
1098
1102
}
1099
- }
1100
- else {
1101
- /* don't push it, frame ignores value */
1102
- assert (f -> f_execute == slp_eval_frame_noval );
1103
- Py_XDECREF (retval );
1104
- }
1103
+ } else
1104
+ Py_FatalError ("invalid frame function" );
1105
1105
f -> f_execute = slp_eval_frame_value ;
1106
-
1107
1106
}
1108
1107
1109
1108
/* always check for an error flag */
You can’t perform that action at this time.
0 commit comments