aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/command.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-07-02 13:45:50 +0200
committerbfredl <bjorn.linse@gmail.com>2024-08-05 11:12:44 +0200
commitf926cc32c9262b6254e2843276b951cef9da1afe (patch)
tree56f13240abae6ec0f3b13022b011da84948788c0 /src/nvim/api/command.c
parent0c2860d9e5ec5417a94db6e3edd237578b76d418 (diff)
downloadrneovim-f926cc32c9262b6254e2843276b951cef9da1afe.tar.gz
rneovim-f926cc32c9262b6254e2843276b951cef9da1afe.tar.bz2
rneovim-f926cc32c9262b6254e2843276b951cef9da1afe.zip
refactor(shada): rework msgpack decoding without msgpack-c
This also makes shada reading slightly faster due to avoiding some copying and allocation. Use keysets to drive decoding of msgpack maps for shada entries.
Diffstat (limited to 'src/nvim/api/command.c')
-rw-r--r--src/nvim/api/command.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/api/command.c b/src/nvim/api/command.c
index 5ad439af9c..78be0a2cf7 100644
--- a/src/nvim/api/command.c
+++ b/src/nvim/api/command.c
@@ -515,7 +515,7 @@ String nvim_cmd(uint64_t channel_id, Dict(cmd) *cmd, Dict(cmd_opts) *opts, Arena
if (HAS_KEY(cmd, cmd, magic)) {
Dict(cmd_magic) magic[1] = KEYDICT_INIT;
- if (!api_dict_to_keydict(magic, KeyDict_cmd_magic_get_field, cmd->magic, err)) {
+ if (!api_dict_to_keydict(magic, DictHash(cmd_magic), cmd->magic, err)) {
goto end;
}
@@ -533,14 +533,14 @@ String nvim_cmd(uint64_t channel_id, Dict(cmd) *cmd, Dict(cmd_opts) *opts, Arena
if (HAS_KEY(cmd, cmd, mods)) {
Dict(cmd_mods) mods[1] = KEYDICT_INIT;
- if (!api_dict_to_keydict(mods, KeyDict_cmd_mods_get_field, cmd->mods, err)) {
+ if (!api_dict_to_keydict(mods, DictHash(cmd_mods), cmd->mods, err)) {
goto end;
}
if (HAS_KEY(mods, cmd_mods, filter)) {
Dict(cmd_mods_filter) filter[1] = KEYDICT_INIT;
- if (!api_dict_to_keydict(&filter, KeyDict_cmd_mods_filter_get_field,
+ if (!api_dict_to_keydict(&filter, DictHash(cmd_mods_filter),
mods->filter, err)) {
goto end;
}