diff options
author | Yury Selivanov <yury@magic.io> | 2018-11-20 13:32:21 -0500 |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2018-11-20 14:25:07 -0500 |
commit | d14e5e91fbd88bae54c69b759ee8d76e6569f2c3 (patch) | |
tree | 1793dc494ddfdfff5f764d8b5dadfe723d3f05c7 | |
parent | 50c23b0b66a5f68aa6307ae115a10af40d32e1df (diff) | |
download | immutables-d14e5e91fbd88bae54c69b759ee8d76e6569f2c3.tar.gz immutables-d14e5e91fbd88bae54c69b759ee8d76e6569f2c3.zip |
Fix comment
-rw-r--r-- | immutables/_map.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/immutables/_map.c b/immutables/_map.c index 9f57582..652e171 100644 --- a/immutables/_map.c +++ b/immutables/_map.c @@ -810,15 +810,17 @@ map_node_bitmap_assoc(MapNode_Bitmap *self, return (MapNode *)self; } - /* We're setting a new value for the key we had before. - Make a new bitmap node with a replaced value, and return it. */ + /* We're setting a new value for the key we had before. */ if (mutid != 0 && self->b_mutid == mutid) { + /* We've been mutating this node before: update inplace. */ Py_INCREF(val); Py_SETREF(self->b_array[val_idx], val); Py_INCREF(self); return (MapNode *)self; } else { + /* Make a new bitmap node with a replaced value, + and return it. */ MapNode_Bitmap *ret = map_node_bitmap_clone(self, mutid); if (ret == NULL) { return NULL; |