Skip to content

Commit d14e5e9

Browse files
committed
Fix comment
1 parent 50c23b0 commit d14e5e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

immutables/_map.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,15 +810,17 @@ map_node_bitmap_assoc(MapNode_Bitmap *self,
810810
return (MapNode *)self;
811811
}
812812

813-
/* We're setting a new value for the key we had before.
814-
Make a new bitmap node with a replaced value, and return it. */
813+
/* We're setting a new value for the key we had before. */
815814
if (mutid != 0 && self->b_mutid == mutid) {
815+
/* We've been mutating this node before: update inplace. */
816816
Py_INCREF(val);
817817
Py_SETREF(self->b_array[val_idx], val);
818818
Py_INCREF(self);
819819
return (MapNode *)self;
820820
}
821821
else {
822+
/* Make a new bitmap node with a replaced value,
823+
and return it. */
822824
MapNode_Bitmap *ret = map_node_bitmap_clone(self, mutid);
823825
if (ret == NULL) {
824826
return NULL;

0 commit comments

Comments
 (0)