summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 26ac159..ccd8fb3 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -3829,8 +3829,9 @@
}
case _CHECK_FUNCTION: {
- PyObject *func = (PyObject *)CURRENT_OPERAND();
- if (frame->f_funcobj != func) goto deoptimize;
+ uint32_t func_version = (uint32_t)CURRENT_OPERAND();
+ assert(PyFunction_Check(frame->f_funcobj));
+ if (((PyFunctionObject *)frame->f_funcobj)->func_version != func_version) goto deoptimize;
break;
}