mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 00:22:51 -06:00
implemented gu_map_count in runtime/c/gu/map.c
This commit is contained in:
@@ -303,6 +303,19 @@ gu_map_iter(GuMap* map, GuMapItor* itor, GuExn* err)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
gu_map_count(GuMap* map)
|
||||||
|
{
|
||||||
|
size_t count = 0;
|
||||||
|
for (size_t i = 0; i < map->data.n_entries; i++) {
|
||||||
|
if (gu_map_entry_is_free(map, &map->data, i)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
static const uint8_t gu_map_no_values[1] = { 0 };
|
static const uint8_t gu_map_no_values[1] = { 0 };
|
||||||
|
|
||||||
GuMap*
|
GuMap*
|
||||||
|
|||||||
Reference in New Issue
Block a user