Skip to content

Commit 1a2dcfe

Browse files
committed
Check verion on function, not method
1 parent 3294632 commit 1a2dcfe

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3186,9 +3186,9 @@ dummy_func(
31863186

31873187
op(_CHECK_METHOD_VERSION, (func_version/2, callable, null, unused[oparg] -- callable, null, unused[oparg])) {
31883188
EXIT_IF(Py_TYPE(callable) != &PyMethod_Type);
3189-
EXIT_IF(!PyFunction_Check(((PyMethodObject *)callable)->im_func));
3190-
PyFunctionObject *func = (PyFunctionObject *)callable;
3191-
EXIT_IF(func->func_version != func_version);
3189+
PyObject *func = ((PyMethodObject *)callable)->im_func;
3190+
EXIT_IF(!PyFunction_Check(func));
3191+
EXIT_IF(((PyFunctionObject *)func)->func_version != func_version);
31923192
EXIT_IF(null != NULL);
31933193
}
31943194

Python/executor_cases.c.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)