mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
gh-102192: use PyErr_SetHandledException instead of the legacy PyErr_SetExcInfo (#103157)
This commit is contained in:
parent
d97aef8ebf
commit
848bdbe166
2 changed files with 2 additions and 2 deletions
|
@ -1842,7 +1842,7 @@ dummy_func(
|
||||||
ERROR_IF(match == NULL, error);
|
ERROR_IF(match == NULL, error);
|
||||||
|
|
||||||
if (!Py_IsNone(match)) {
|
if (!Py_IsNone(match)) {
|
||||||
PyErr_SetExcInfo(NULL, Py_NewRef(match), NULL);
|
PyErr_SetHandledException(match);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
Python/generated_cases.c.h
generated
2
Python/generated_cases.c.h
generated
|
@ -2591,7 +2591,7 @@
|
||||||
if (match == NULL) goto pop_2_error;
|
if (match == NULL) goto pop_2_error;
|
||||||
|
|
||||||
if (!Py_IsNone(match)) {
|
if (!Py_IsNone(match)) {
|
||||||
PyErr_SetExcInfo(NULL, Py_NewRef(match), NULL);
|
PyErr_SetHandledException(match);
|
||||||
}
|
}
|
||||||
#line 2597 "Python/generated_cases.c.h"
|
#line 2597 "Python/generated_cases.c.h"
|
||||||
stack_pointer[-1] = match;
|
stack_pointer[-1] = match;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue