Skip to content

Commit 37e58ef

Browse files
committed
address review and add assert
1 parent 1bf64fd commit 37e58ef

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

Modules/_testinternalcapi/test_cases.c.h

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

Python/bytecodes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3921,6 +3921,7 @@ dummy_func(
39213921

39223922
op(_CHECK_FUNCTION_VERSION, (func_version/2, callable, unused, unused[oparg] -- callable, unused, unused[oparg])) {
39233923
PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable);
3924+
assert(PyFunction_Check(callable_o));
39243925
PyFunctionObject *func = (PyFunctionObject *)callable_o;
39253926
EXIT_IF(func->func_version != func_version);
39263927
}

Python/executor_cases.c.h

Lines changed: 1 addition & 0 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 & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)