summaryrefslogtreecommitdiffstats
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index 53c0211..7289272 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -1205,9 +1205,7 @@
}
assert(PyTuple_CheckExact(callargs));
EVAL_CALL_STAT_INC_IF_FUNCTION(EVAL_CALL_FUNCTION_EX, func);
- if (opcode == INSTRUMENTED_CALL_FUNCTION_EX &&
- !PyFunction_Check(func) && !PyMethod_Check(func)
- ) {
+ if (opcode == INSTRUMENTED_CALL_FUNCTION_EX) {
PyObject *arg = PyTuple_GET_SIZE(callargs) > 0 ?
PyTuple_GET_ITEM(callargs, 0) : Py_None;
int err = _Py_call_instrumentation_2args(
@@ -1215,17 +1213,19 @@
frame, this_instr, func, arg);
if (err) GOTO_ERROR(error);
result = PyObject_Call(func, callargs, kwargs);
- if (result == NULL) {
- _Py_call_instrumentation_exc2(
- tstate, PY_MONITORING_EVENT_C_RAISE,
- frame, this_instr, func, arg);
- }
- else {
- int err = _Py_call_instrumentation_2args(
- tstate, PY_MONITORING_EVENT_C_RETURN,
- frame, this_instr, func, arg);
- if (err < 0) {
- Py_CLEAR(result);
+ if (!PyFunction_Check(func) && !PyMethod_Check(func)) {
+ if (result == NULL) {
+ _Py_call_instrumentation_exc2(
+ tstate, PY_MONITORING_EVENT_C_RAISE,
+ frame, this_instr, func, arg);
+ }
+ else {
+ int err = _Py_call_instrumentation_2args(
+ tstate, PY_MONITORING_EVENT_C_RETURN,
+ frame, this_instr, func, arg);
+ if (err < 0) {
+ Py_CLEAR(result);
+ }
}
}
}