Skip to content

Commit

Permalink
pythongh-103082: remove assumption that INSTRUMENTED_LINE is the last…
Browse files Browse the repository at this point in the history
… instrumented opcode (python#107978)
  • Loading branch information
iritkatriel authored Aug 15, 2023
1 parent 0932272 commit 971a4c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/instrumentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static inline bool
opcode_has_event(int opcode)
{
return (
opcode < INSTRUMENTED_LINE &&
opcode != INSTRUMENTED_LINE &&
INSTRUMENTED_OPCODES[opcode] > 0
);
}
Expand Down Expand Up @@ -1202,7 +1202,7 @@ _Py_call_instrumentation_line(PyThreadState *tstate, _PyInterpreterFrame* frame,
Py_DECREF(line_obj);
done:
assert(original_opcode != 0);
assert(original_opcode < INSTRUMENTED_LINE);
assert(original_opcode != INSTRUMENTED_LINE);
assert(_PyOpcode_Deopt[original_opcode] == original_opcode);
return original_opcode;
}
Expand Down

0 comments on commit 971a4c2

Please sign in to comment.