diff options
Diffstat (limited to 'src/nvim/map.c')
| -rw-r--r-- | src/nvim/map.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/map.c b/src/nvim/map.c index 31fe8a01ea..06ae19f5bc 100644 --- a/src/nvim/map.c +++ b/src/nvim/map.c @@ -16,6 +16,8 @@ #define uint64_t_eq kh_int64_hash_equal #define uint32_t_hash kh_int_hash_func #define uint32_t_eq kh_int_hash_equal +#define int_hash kh_int_hash_func +#define int_eq kh_int_hash_equal #if defined(ARCH_64) #define ptr_t_hash(key) uint64_t_hash((uint64_t)key) @@ -87,6 +89,11 @@ } \ \ return rv; \ + } \ + \ + void map_##T##_##U##_clear(Map(T, U) *map) \ + { \ + kh_clear(T##_##U##_map, map->table); \ } static inline khint_t String_hash(String s) @@ -104,6 +111,7 @@ static inline bool String_eq(String a, String b) } +MAP_IMPL(int, int, DEFAULT_INITIALIZER) MAP_IMPL(cstr_t, uint64_t, DEFAULT_INITIALIZER) MAP_IMPL(cstr_t, ptr_t, DEFAULT_INITIALIZER) MAP_IMPL(ptr_t, ptr_t, DEFAULT_INITIALIZER) |