diff options
author | Guido van Rossum <guido@python.org> | 2023-08-25 21:26:58 -0700 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-08-26 06:33:04 +0200 |
commit | 0b46cb921ef63eef527199d051985d98f2347267 (patch) | |
tree | 37e3ea119e8c01bb5beebfa0b77fe64fa4427751 | |
parent | Remove assert that should've been DEOPT_IF (diff) | |
download | cpython-0b46cb921ef63eef527199d051985d98f2347267.tar.gz cpython-0b46cb921ef63eef527199d051985d98f2347267.tar.bz2 cpython-0b46cb921ef63eef527199d051985d98f2347267.zip |
Add back a different assert(self != NULL)gentoo-3.12.0rc1_p5
-rw-r--r-- | Python/bytecodes.c | 2 | ||||
-rw-r--r-- | Python/generated_cases.c.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index d1c79371c45..5e80e06205a 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -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) { diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index e697352b8d9..a3c04956926 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -4248,9 +4248,9 @@ #line 2993 "Python/bytecodes.c" 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) { |