diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-09-10 19:10:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-10 19:10:29 +0200 |
commit | a03e00a3539ea995c69196aeb35d84912ead8c3f (patch) | |
tree | 2b51edf78bf7c8c62c05a70b67f3b9e7497c1b6e /src/nvim/map.c | |
parent | 06d48f6aa65a6694f7850246f56f208f98dcc587 (diff) | |
parent | bf36b0f8ec35281dd7e7e350d7d5d2810019d402 (diff) | |
download | rneovim-a03e00a3539ea995c69196aeb35d84912ead8c3f.tar.gz rneovim-a03e00a3539ea995c69196aeb35d84912ead8c3f.tar.bz2 rneovim-a03e00a3539ea995c69196aeb35d84912ead8c3f.zip |
Merge pull request #24875 from bfredl/memfilemap
refactor(memfile): change mf_trans and mf_hash from ad-hoc hashtable to Map
Diffstat (limited to 'src/nvim/map.c')
-rw-r--r-- | src/nvim/map.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/map.c b/src/nvim/map.c index e2c6443245..33a7759a1b 100644 --- a/src/nvim/map.c +++ b/src/nvim/map.c @@ -25,6 +25,8 @@ #define equal_uint32_t equal_simple #define hash_int(x) hash_uint32_t((uint32_t)(x)) #define equal_int equal_simple +#define hash_int64_t(key) hash_uint64_t((uint64_t)key) +#define equal_int64_t equal_simple #if defined(ARCH_64) # define hash_ptr_t(key) hash_uint64_t((uint64_t)(key)) @@ -182,6 +184,16 @@ void mh_clear(MapHash *h) #undef VAL_NAME #undef KEY_NAME +#define KEY_NAME(x) x##int64_t +#include "nvim/map_key_impl.c.h" +#define VAL_NAME(x) quasiquote(x, ptr_t) +#include "nvim/map_value_impl.c.h" +#undef VAL_NAME +#define VAL_NAME(x) quasiquote(x, int64_t) +#include "nvim/map_value_impl.c.h" +#undef VAL_NAME +#undef KEY_NAME + #define KEY_NAME(x) x##HlEntry #include "nvim/map_key_impl.c.h" #define VAL_NAME(x) quasiquote(x, int) |