Make RESUME monitoring more readable and robust (GH-142136)

This commit is contained in:
Gabriele N. Tornetta 2025-12-16 16:23:27 +00:00 committed by GitHub
parent a043407510
commit 16a305f152
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -240,7 +240,7 @@ dummy_func(
op(_MONITOR_RESUME, (--)) {
int err = _Py_call_instrumentation(
tstate, oparg > 0, frame, this_instr);
tstate, oparg == 0 ? PY_MONITORING_EVENT_PY_START : PY_MONITORING_EVENT_PY_RESUME, frame, this_instr);
ERROR_IF(err);
if (frame->instr_ptr != this_instr) {
/* Instrumentation has jumped */

View file

@ -7196,7 +7196,7 @@
{
_PyFrame_SetStackPointer(frame, stack_pointer);
int err = _Py_call_instrumentation(
tstate, oparg > 0, frame, this_instr);
tstate, oparg == 0 ? PY_MONITORING_EVENT_PY_START : PY_MONITORING_EVENT_PY_RESUME, frame, this_instr);
stack_pointer = _PyFrame_GetStackPointer(frame);
if (err) {
JUMP_TO_LABEL(error);