refactor: replace char_u with char (#21901)

refactor: replace char_u with char

Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
dundargoc
2023-02-11 11:05:57 +01:00
committed by GitHub
parent ee87b848a2
commit 4be6c6cf0d
47 changed files with 471 additions and 475 deletions

View File

@@ -127,7 +127,7 @@ Dictionary nvim_parse_cmd(String str, Dictionary opts, Error *err)
// otherwise split arguments by whitespace.
if (ea.argt & EX_NOSPC) {
if (*ea.arg != NUL) {
ADD(args, STRING_OBJ(cstrn_to_string((char *)ea.arg, length)));
ADD(args, STRING_OBJ(cstrn_to_string(ea.arg, length)));
}
} else {
size_t end = 0;
@@ -153,9 +153,9 @@ Dictionary nvim_parse_cmd(String str, Dictionary opts, Error *err)
}
if (cmd != NULL) {
PUT(result, "cmd", CSTR_TO_OBJ((char *)cmd->uc_name));
PUT(result, "cmd", CSTR_TO_OBJ(cmd->uc_name));
} else {
PUT(result, "cmd", CSTR_TO_OBJ((char *)get_command_name(NULL, ea.cmdidx)));
PUT(result, "cmd", CSTR_TO_OBJ(get_command_name(NULL, ea.cmdidx)));
}
if (ea.argt & EX_RANGE) {
@@ -237,7 +237,7 @@ Dictionary nvim_parse_cmd(String str, Dictionary opts, Error *err)
break;
}
PUT(result, "addr", CSTR_TO_OBJ(addr));
PUT(result, "nextcmd", CSTR_TO_OBJ((char *)ea.nextcmd));
PUT(result, "nextcmd", CSTR_TO_OBJ(ea.nextcmd));
Dictionary mods = ARRAY_DICT_INIT;