Skip to content

Commit 20725f4

Browse files
chore: shorten comment further
1 parent d6ac3bf commit 20725f4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎Python/context.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -866,8 +866,8 @@ contextvar_set(PyContextVar *var, PyObject *val)
866866
return -1;
867867
}
868868

869-
// gh-148891: _PyHamt_Assoc may allocate nodes, which may trigger GC.
870-
// Bump the reference count to prevent the HAMT from being freed during traversal.
869+
// gh-148891: Make a strong reference so a GC during _PyHamt_Assoc will
870+
// not free the HAMT during traversal.
871871
PyHamtObject *old_vars = context_get_current_vars(ctx);
872872
Py_INCREF(old_vars);
873873
PyHamtObject *new_vars = _PyHamt_Assoc(
@@ -899,8 +899,8 @@ contextvar_del(PyContextVar *var)
899899
return -1;
900900
}
901901

902-
// gh-148891: _PyHamt_Without may allocate nodes, which may trigger GC.
903-
// Bump the reference count to prevent the HAMT from being freed during traversal.
902+
// gh-148891: Make a strong reference so a GC during _PyHamt_Without will
903+
// not free the HAMT during traversal.
904904
PyHamtObject *vars = context_get_current_vars(ctx);
905905
Py_INCREF(vars);
906906
PyHamtObject *new_vars = _PyHamt_Without(vars, (PyObject *)var);

0 commit comments

Comments
 (0)