mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 18:36:30 +00:00
refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -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|.
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user