]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove the binary_subscr_dict_error label (GH-96443)
authorBrandt Bucher <brandtbucher@microsoft.com>
Tue, 30 Aug 2022 22:45:24 +0000 (15:45 -0700)
committerGitHub <noreply@github.com>
Tue, 30 Aug 2022 22:45:24 +0000 (15:45 -0700)
Python/ceval.c

index b3a0a3640eb97dfd3fc10323da56f8e4daa94feb..c61ccd7dfc6f56972df9574396eaca07d2e287e7 100644 (file)
@@ -1621,7 +1621,10 @@ handle_eval_breaker:
             PyObject *sub = TOP();
             PyObject *res = PyDict_GetItemWithError(dict, sub);
             if (res == NULL) {
-                goto binary_subscr_dict_error;
+                if (!_PyErr_Occurred(tstate)) {
+                    _PyErr_SetKeyError(sub);
+                }
+                goto error;
             }
             Py_INCREF(res);
             STACK_SHRINK(1);
@@ -5193,16 +5196,6 @@ miss:
         DISPATCH_GOTO();
     }
 
-binary_subscr_dict_error:
-        {
-            PyObject *sub = POP();
-            if (!_PyErr_Occurred(tstate)) {
-                _PyErr_SetKeyError(sub);
-            }
-            Py_DECREF(sub);
-            goto error;
-        }
-
 unbound_local_error:
         {
             format_exc_check_arg(tstate, PyExc_UnboundLocalError,