mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-111375: Use NULL
rather than None
in the exception stack to indicate that an exception was handled (#113302)
This commit is contained in:
parent
1ff0238594
commit
a2dd0e7038
6 changed files with 9 additions and 7 deletions
2
Python/executor_cases.c.h
generated
2
Python/executor_cases.c.h
generated
|
@ -806,7 +806,7 @@
|
|||
PyObject *exc_value;
|
||||
exc_value = stack_pointer[-1];
|
||||
_PyErr_StackItem *exc_info = tstate->exc_info;
|
||||
Py_XSETREF(exc_info->exc_value, exc_value);
|
||||
Py_XSETREF(exc_info->exc_value, exc_value == Py_None ? NULL : exc_value);
|
||||
stack_pointer += -1;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue