diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-09-08 13:26:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 13:26:37 +0200 |
commit | cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0 (patch) | |
tree | 59bd8e97d87fa5da7cc95f290f47b93eaf8dd953 /src/nvim/lua/treesitter.c | |
parent | 6a8b48e24cbe070846dd1d234553b3fdeb19460e (diff) | |
parent | 5970157e1d22fd5e05ae5d3bd949f807fb7a744c (diff) | |
download | rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.tar.gz rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.tar.bz2 rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.zip |
Merge pull request #24985 from bfredl/hash2
refactor(map): enhanced implementation, Clean Codeā¢, etc etc
Diffstat (limited to 'src/nvim/lua/treesitter.c')
-rw-r--r-- | src/nvim/lua/treesitter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index 45fe7f6129..d255dd56e5 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -173,7 +173,7 @@ void tslua_init(lua_State *L) int tslua_has_language(lua_State *L) { const char *lang_name = luaL_checkstring(L, 1); - lua_pushboolean(L, pmap_has(cstr_t)(&langs, lang_name)); + lua_pushboolean(L, map_has(cstr_t, &langs, lang_name)); return 1; } @@ -190,7 +190,7 @@ int tslua_add_language(lua_State *L) symbol_name = luaL_checkstring(L, 3); } - if (pmap_has(cstr_t)(&langs, lang_name)) { + if (map_has(cstr_t, &langs, lang_name)) { lua_pushboolean(L, true); return 1; } @@ -243,7 +243,7 @@ int tslua_add_language(lua_State *L) int tslua_remove_lang(lua_State *L) { const char *lang_name = luaL_checkstring(L, 1); - bool present = pmap_has(cstr_t)(&langs, lang_name); + bool present = map_has(cstr_t, &langs, lang_name); if (present) { cstr_t key; pmap_del(cstr_t)(&langs, lang_name, &key); |