Skip to content

Commit 481ad4b

Browse files
committed
address review and add assert
1 parent ebcc043 commit 481ad4b

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
@@ -3926,6 +3926,7 @@ dummy_func(
39263926

39273927
op(_CHECK_FUNCTION_VERSION, (func_version/2, callable, unused, unused[oparg] -- callable, unused, unused[oparg])) {
39283928
PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable);
3929+
assert(PyFunction_Check(callable_o));
39293930
PyFunctionObject *func = (PyFunctionObject *)callable_o;
39303931
EXIT_IF(func->func_version != func_version);
39313932
}

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)