diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2022-08-30 22:45:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-30 22:45:24 (GMT) |
commit | 88671a9d6916229badc8b97a358a0f596f5aa0a1 (patch) | |
tree | b44d4537f1b1fc2c9fb83db083357ff4c25eff06 /Python/ceval.c | |
parent | 02dbb362d3fb7d82af9dce7c8caac08fe0d8efdb (diff) | |
download | cpython-88671a9d6916229badc8b97a358a0f596f5aa0a1.zip cpython-88671a9d6916229badc8b97a358a0f596f5aa0a1.tar.gz cpython-88671a9d6916229badc8b97a358a0f596f5aa0a1.tar.bz2 |
Remove the binary_subscr_dict_error label (GH-96443)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index b3a0a36..c61ccd7 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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, |