Skip to content

Commit 1a1a46c

Browse files
committed
Double trashcan overhead
1 parent 3a3817e commit 1a1a46c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Include/cpython/object.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,13 +493,13 @@ PyAPI_FUNC(int) _Py_ReachedRecursionLimitWithMargin(PyThreadState *tstate, int m
493493
#define Py_TRASHCAN_BEGIN(op, dealloc) \
494494
do { \
495495
PyThreadState *tstate = PyThreadState_Get(); \
496-
if (_Py_ReachedRecursionLimitWithMargin(tstate, 1) && Py_TYPE(op)->tp_dealloc == (destructor)dealloc) { \
496+
if (_Py_ReachedRecursionLimitWithMargin(tstate, 2) && Py_TYPE(op)->tp_dealloc == (destructor)dealloc) { \
497497
_PyTrash_thread_deposit_object(tstate, (PyObject *)op); \
498498
break; \
499499
}
500500
/* The body of the deallocator is here. */
501501
#define Py_TRASHCAN_END \
502-
if (tstate->delete_later && !_Py_ReachedRecursionLimitWithMargin(tstate, 2)) { \
502+
if (tstate->delete_later && !_Py_ReachedRecursionLimitWithMargin(tstate, 4)) { \
503503
_PyTrash_thread_destroy_chain(tstate); \
504504
} \
505505
} while (0);

0 commit comments

Comments
 (0)