Skip to content

Commit d2dcb87

Browse files
committed
add asserts
1 parent 7f2c4a0 commit d2dcb87

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

Modules/_testinternalcapi/test_cases.c.h

Lines changed: 2 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,8 @@ dummy_func(
983983
if (res_o == NULL) {
984984
ERROR_NO_POP();
985985
}
986+
assert(d->result_type == NULL || Py_TYPE(res_o) == d->result_type);
987+
assert(!d->result_unique || Py_REFCNT(res_o) == 1 || _Py_IsImmortal(res_o));
986988
res = PyStackRef_FromPyObjectSteal(res_o);
987989
l = left;
988990
r = right;

Python/executor_cases.c.h

Lines changed: 2 additions & 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: 2 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)