[3.12] gh-116735: Use MISSING for CALL event if argument is absen… (#116873)

[3.12] gh-116735: Use `MISSING` for `CALL` event if argument is absent (GH-116737)
This commit is contained in:
Tian Gao 2024-03-19 10:00:54 -07:00 committed by GitHub
parent 5da6e3082c
commit 688623d402
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 3 deletions

View file

@ -3209,7 +3209,7 @@ dummy_func(
EVAL_CALL_STAT_INC_IF_FUNCTION(EVAL_CALL_FUNCTION_EX, func);
if (opcode == INSTRUMENTED_CALL_FUNCTION_EX) {
PyObject *arg = PyTuple_GET_SIZE(callargs) > 0 ?
PyTuple_GET_ITEM(callargs, 0) : Py_None;
PyTuple_GET_ITEM(callargs, 0) : &_PyInstrumentation_MISSING;
int err = _Py_call_instrumentation_2args(
tstate, PY_MONITORING_EVENT_CALL,
frame, next_instr-1, func, arg);