mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
GH-124715: Move trashcan mechanism into Py_Dealloc
(GH-132280)
This commit is contained in:
parent
0f23e84cda
commit
44e4c479fb
26 changed files with 88 additions and 196 deletions
|
@ -482,12 +482,6 @@ _Py_CheckRecursiveCall(PyThreadState *tstate, const char *where)
|
|||
_PyThreadStateImpl *_tstate = (_PyThreadStateImpl *)tstate;
|
||||
uintptr_t here_addr = _Py_get_machine_stack_pointer();
|
||||
assert(_tstate->c_stack_soft_limit != 0);
|
||||
if (_tstate->c_stack_hard_limit == 0) {
|
||||
_Py_InitializeRecursionLimits(tstate);
|
||||
}
|
||||
if (here_addr >= _tstate->c_stack_soft_limit) {
|
||||
return 0;
|
||||
}
|
||||
assert(_tstate->c_stack_hard_limit != 0);
|
||||
if (here_addr < _tstate->c_stack_hard_limit) {
|
||||
/* Overflowing while handling an overflow. Give up. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue