Skip to content

Commit d132fab

Browse files
committed
Improve code comments.
1 parent 44eb332 commit d132fab

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Objects/typeobject.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5979,6 +5979,8 @@ update_slot_world_stopped(PyTypeObject *type, PyObject *name)
59795979
}
59805980
#endif
59815981

5982+
// Called by type_setattro(). Updates both the type dict and
5983+
// any type slots that correspond to the modified entry.
59825984
static int
59835985
type_update_dict(PyTypeObject *type, PyDictObject *dict, PyObject *name,
59845986
PyObject *value, PyObject **old_value)
@@ -11306,8 +11308,9 @@ update_all_slots(PyTypeObject* type)
1130611308
ASSERT_TYPE_LOCK_HELD();
1130711309

1130811310
#ifdef TYPE_SLOT_UPDATE_NEEDS_STOP
11309-
// Similar to update_slot_world_stopped(), this is required to
11310-
// avoid races. We do it once here rather than once per-slot.
11311+
// Similar to update_slot_world_stopped(), this is required to avoid
11312+
// races. We don't use update_slot_world_stopped() here because we want
11313+
// to stop once rather than once per slot.
1131111314
PyInterpreterState *interp = _PyInterpreterState_GET();
1131211315
_PyEval_StopTheWorld(interp);
1131311316
#endif

0 commit comments

Comments
 (0)