diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2022-04-01 12:59:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 12:59:38 (GMT) |
commit | 04e07c258f4f2ac85e25355242a113f98a706f04 (patch) | |
tree | 166df77e0d1e0bbaf6c4fcd8b1f3584010cf6c26 /Python/ceval.c | |
parent | ae9de82e321581e1906c6ef2a7ad83ab30ae3325 (diff) | |
download | cpython-04e07c258f4f2ac85e25355242a113f98a706f04.zip cpython-04e07c258f4f2ac85e25355242a113f98a706f04.tar.gz cpython-04e07c258f4f2ac85e25355242a113f98a706f04.tar.bz2 |
bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 8c1f21b..43080f8 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3853,7 +3853,7 @@ handle_eval_breaker: DISPATCH(); } - TARGET(JUMP_IF_NOT_EXC_MATCH) { + TARGET(CHECK_EXC_MATCH) { PyObject *right = POP(); PyObject *left = TOP(); assert(PyExceptionInstance_Check(left)); @@ -3864,9 +3864,7 @@ handle_eval_breaker: int res = PyErr_GivenExceptionMatches(left, right); Py_DECREF(right); - if (res == 0) { - JUMPTO(oparg); - } + PUSH(Py_NewRef(res ? Py_True : Py_False)); DISPATCH(); } |