Skip to content

Commit dff746f

Browse files
Add comments for delete_later from _ts
1 parent 80eeee9 commit dff746f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Include/cpython/pystate.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ struct _ts {
157157
*/
158158
unsigned long native_thread_id;
159159

160+
/* List of objects that still need to be cleaned up, singly linked
161+
* via their gc headers' gc_next pointers. */
160162
PyObject *delete_later;
161163

162164
/* Tagged pointer to top-most critical section, or zero if there is no

Objects/object.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3050,7 +3050,7 @@ Py_ReprLeave(PyObject *obj)
30503050

30513051
/* Trashcan support. */
30523052

3053-
/* Add op to the gcstate->trash_delete_later list. Called when the current
3053+
/* Add op to the tstate->delete_later list. Called when the current
30543054
* call-stack depth gets large. op must be a gc'ed object, with refcount 0.
30553055
* Py_DECREF must already have been called on it.
30563056
*/
@@ -3076,7 +3076,7 @@ _PyTrash_thread_deposit_object(PyThreadState *tstate, PyObject *op)
30763076
tstate->delete_later = op;
30773077
}
30783078

3079-
/* Deallocate all the objects in the gcstate->trash_delete_later list.
3079+
/* Deallocate all the objects in the tstate->delete_later list.
30803080
* Called when the call-stack unwinds again. */
30813081
void
30823082
_PyTrash_thread_destroy_chain(PyThreadState *tstate)

0 commit comments

Comments
 (0)