Commit ce6a533
authored
In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that
were not properly untracked before starting destruction, take care to
untrack the object _before_ warning, to avoid triggering a GC run and
causing the problem the code tries to warn about. Also make sure to save and
restore any pending exceptions, which the warning would otherwise clobber or
trigger an assertion error on.
1 parent 21615f7 commit ce6a533
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2396 | 2396 | | |
2397 | 2397 | | |
2398 | 2398 | | |
| 2399 | + | |
2399 | 2400 | | |
| 2401 | + | |
2400 | 2402 | | |
2401 | 2403 | | |
2402 | 2404 | | |
2403 | 2405 | | |
2404 | 2406 | | |
| 2407 | + | |
2405 | 2408 | | |
2406 | | - | |
2407 | 2409 | | |
2408 | 2410 | | |
2409 | 2411 | | |
| |||
0 commit comments