diff options
author | Adrian Thurston <thurston@complang.org> | 2015-01-17 15:59:53 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-01-17 16:01:12 -0500 |
commit | 8e87d8e820bee8f4a957bdc00b33b7966f542189 (patch) | |
tree | e0deefc2ea379e7c4a788d90c64f8e6ea8b1629d /src/map.c | |
parent | f63f06c1296da21bdddbbb7cca8f8e4cf62efca1 (diff) | |
download | colm-8e87d8e820bee8f4a957bdc00b33b7966f542189.tar.gz |
only undo the insert if the insert was successful
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -616,9 +616,9 @@ MapEl *mapInsertKey( Program *prg, Map *map, Tree *key, MapEl **lastFound ) } } -void colm_map_insert( Program *prg, Map *map, MapEl *mapEl ) +MapEl *colm_map_insert( Program *prg, Map *map, MapEl *mapEl ) { - mapInsertEl( prg, map, mapEl, 0 ); + return mapInsertEl( prg, map, mapEl, 0 ); } void colm_map_detach( Program *prg, Map *map, MapEl *mapEl ) |