Skip to content

Commit

Permalink
Add back a different assert(self != NULL)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum authored and mgorny committed Aug 26, 2023
1 parent d74a1fc commit 0b46cb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2992,9 +2992,9 @@ dummy_func(
inst(CALL_NO_KW_LIST_APPEND, (unused/1, unused/2, method, self, args[oparg] -- unused)) {
assert(kwnames == NULL);
assert(oparg == 1);

PyInterpreterState *interp = _PyInterpreterState_GET();
DEOPT_IF(method != interp->callable_cache.list_append, CALL);
assert(self != NULL);
DEOPT_IF(!PyList_Check(self), CALL);
STAT_INC(CALL, hit);
if (_PyList_AppendTakeRef((PyListObject *)self, args[0]) < 0) {
Expand Down
2 changes: 1 addition & 1 deletion Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b46cb9

Please sign in to comment.