summaryrefslogtreecommitdiff
path: root/src/map.c
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-02-13 22:13:30 -0500
committerAdrian Thurston <thurston@complang.org>2015-02-13 22:59:30 -0500
commit774ace89051bddee3197870aa0a90afde00bd1ad (patch)
treea5c671c53e8e12bc067ec7868828eb590f1e23ac /src/map.c
parent7971f22167db5f108430e4735e4cc1b492e6bd9d (diff)
downloadcolm-774ace89051bddee3197870aa0a90afde00bd1ad.tar.gz
implemented vmap remove
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map.c b/src/map.c
index d25f4548..c69ba208 100644
--- a/src/map.c
+++ b/src/map.c
@@ -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 );