refactor: replace char_u variables and functions with char

Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
Dundar Goc
2022-05-03 11:06:27 +02:00
parent 3ec93ca92c
commit 5576d30e89
42 changed files with 555 additions and 562 deletions

View File

@@ -474,7 +474,7 @@ Integer nvim_create_autocmd(uint64_t channel_id, Object event, Dict(create_autoc
Object *command = &opts->command;
if (command->type == kObjectTypeString) {
aucmd.type = CALLABLE_EX;
aucmd.callable.cmd = (char_u *)string_to_cstr(command->data.string);
aucmd.callable.cmd = string_to_cstr(command->data.string);
} else {
api_set_error(err,
kErrorTypeValidation,
@@ -657,8 +657,6 @@ void nvim_clear_autocmds(Dict(clear_autocmds) *opts, Error *err)
cleanup:
api_free_array(event_array);
api_free_array(patterns);
return;
}
/// Create or get an autocommand group |autocmd-groups|.

View File

@@ -2210,7 +2210,7 @@ Array nvim_get_mark(String name, Dictionary opts, Error *err)
allocated = true;
// Marks comes from shada
} else {
filename = (char *)mark.fname;
filename = mark.fname;
bufnr = 0;
}

View File

@@ -827,7 +827,7 @@ Dictionary nvim_parse_cmd(String str, Dictionary opts, Error *err)
bool done = false;
while (!done) {
done = uc_split_args_iter(ea.arg, length, &end, buf, &len);
done = uc_split_args_iter((char_u *)ea.arg, length, &end, buf, &len);
if (len > 0) {
ADD(args, STRING_OBJ(cstrn_to_string(buf, len)));
}