diff options
author | Adrian Thurston <thurston@complang.org> | 2015-02-13 22:13:30 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-02-13 22:59:30 -0500 |
commit | 774ace89051bddee3197870aa0a90afde00bd1ad (patch) | |
tree | a5c671c53e8e12bc067ec7868828eb590f1e23ac /src/map.c | |
parent | 7971f22167db5f108430e4735e4cc1b492e6bd9d (diff) | |
download | colm-774ace89051bddee3197870aa0a90afde00bd1ad.tar.gz |
implemented vmap remove
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -663,6 +663,13 @@ MapEl *colm_vmap_insert( Program *prg, Map *map, Struct *key, Struct *value ) colm_map_insert( prg, map, mapEl ); } +MapEl *colm_vmap_remove( Program *prg, Map *map, Struct *key ) +{ + MapEl *mapEl = colm_map_find( prg, map, key ); + if ( mapEl != 0 ) + colm_map_detach( prg, map, mapEl ); +} + void colm_map_detach( Program *prg, Map *map, MapEl *mapEl ) { mapDetach( prg, map, mapEl ); |