Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Commit69ec652
committed
Use NULL in the exception stack to indicate an exception was handled
Previously, both `NULL` and `Py_None` would be used interchangeably toindicate that an exception is no longer being handled. By ensuring thatonly `NULL` is used, this opens up the possibility to use `Py_None` toindicate a cleared exception. The difference here would be that clearingwould indicate that no exception is currently being handled vs. handlingwould indicate that the next exception in the stack is currently beinghandled.This functionality will be used to patch up some edge cases in how theexception context interacts with exceptions thrown into coroutines.This is implemented in this commit by changing code that could add`Py_None` to the exception stack to indicate that an exception is nolonger being handled to add `NULL` instead. An assert was also added toensure that `Py_None` is no longer added to the exception stack.Seegh-111676 for context.1 parent4afa7be commit69ec652
File tree
6 files changed
+8
-5
lines changed- Misc/NEWS.d/next/Core and Builtins
- Objects
- Python
6 files changed
+8
-5
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + |
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
811 | 811 |
| |
812 | 812 |
| |
813 | 813 |
| |
814 |
| - | |
| 814 | + | |
815 | 815 |
| |
816 | 816 |
| |
817 | 817 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1100 | 1100 |
| |
1101 | 1101 |
| |
1102 | 1102 |
| |
1103 |
| - | |
| 1103 | + | |
1104 | 1104 |
| |
1105 | 1105 |
| |
1106 | 1106 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
| 129 | + | |
129 | 130 |
| |
130 | 131 |
| |
131 | 132 |
| |
| |||
592 | 593 |
| |
593 | 594 |
| |
594 | 595 |
| |
595 |
| - | |
| 596 | + | |
596 | 597 |
| |
597 | 598 |
| |
598 | 599 |
| |
|
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
0 commit comments
Comments
(0)