]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98879: Remove unreachable error case from COMPARE_OP_STR_JUMP (GH-98882)
authorDennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
Sun, 30 Oct 2022 23:07:11 +0000 (19:07 -0400)
committerGitHub <noreply@github.com>
Sun, 30 Oct 2022 23:07:11 +0000 (19:07 -0400)
Thanks to PEP 623 changes, the comparison cannot fail.

Python/ceval.c

index 24af419d29c50a800ec94953d9976e73e75a051a..f2250ffbc71fa9ffbda7370e1346d5d92b51f6f8 100644 (file)
@@ -3420,9 +3420,6 @@ handle_eval_breaker:
             DEOPT_IF(!PyUnicode_CheckExact(right), COMPARE_OP);
             STAT_INC(COMPARE_OP, hit);
             int res = _PyUnicode_Equal(left, right);
-            if (res < 0) {
-                goto error;
-            }
             assert(oparg == Py_EQ || oparg == Py_NE);
             JUMPBY(INLINE_CACHE_ENTRIES_COMPARE_OP);
             NEXTOPARG();