summaryrefslogtreecommitdiffstats
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-02-08 09:31:12 (GMT)
committerGitHub <noreply@github.com>2023-02-08 09:31:12 (GMT)
commitfeec49c40736fc05626a183a8d14c4ebbea5ae28 (patch)
tree5af6110eca8c2a21a9f699b40a87e7567c603e98 /Python/generated_cases.c.h
parent027adf42cd85db41fee05b0a40d89ef822876c97 (diff)
downloadcpython-feec49c40736fc05626a183a8d14c4ebbea5ae28.zip
cpython-feec49c40736fc05626a183a8d14c4ebbea5ae28.tar.gz
cpython-feec49c40736fc05626a183a8d14c4ebbea5ae28.tar.bz2
GH-101578: Normalize the current exception (GH-101607)
* Make sure that the current exception is always normalized. * Remove redundant type and traceback fields for the current exception. * Add new API functions: PyErr_GetRaisedException, PyErr_SetRaisedException * Add new API functions: PyException_GetArgs, PyException_SetArgs
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index f382864..09eb689 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -1036,9 +1036,7 @@
Py_DECREF(exc_value);
}
else {
- PyObject *exc_type = Py_NewRef(Py_TYPE(exc_value));
- PyObject *exc_traceback = PyException_GetTraceback(exc_value);
- _PyErr_Restore(tstate, exc_type, Py_NewRef(exc_value), exc_traceback);
+ _PyErr_SetRaisedException(tstate, Py_NewRef(exc_value));
goto exception_unwind;
}
STACK_SHRINK(2);