diff options
author | Dundar Goc <gocdundar@gmail.com> | 2022-05-03 11:06:27 +0200 |
---|---|---|
committer | Dundar Goc <gocdundar@gmail.com> | 2022-05-04 15:25:54 +0200 |
commit | 5576d30e89153c817fb1a8d23c30cfc0432bc7c6 (patch) | |
tree | 3a1457be276d95ffccbb760e79c708ab11b2cd54 /src/nvim/api | |
parent | 3ec93ca92cb08faed342586e86a6f21b35264376 (diff) | |
download | rneovim-5576d30e89153c817fb1a8d23c30cfc0432bc7c6.tar.gz rneovim-5576d30e89153c817fb1a8d23c30cfc0432bc7c6.tar.bz2 rneovim-5576d30e89153c817fb1a8d23c30cfc0432bc7c6.zip |
refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/api')
-rw-r--r-- | src/nvim/api/autocmd.c | 4 | ||||
-rw-r--r-- | src/nvim/api/vim.c | 2 | ||||
-rw-r--r-- | src/nvim/api/vimscript.c | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c index 0db9a63e7a..2f4f57049e 100644 --- a/src/nvim/api/autocmd.c +++ b/src/nvim/api/autocmd.c @@ -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|. diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 3f0cfb82a6..2323b8db47 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -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; } diff --git a/src/nvim/api/vimscript.c b/src/nvim/api/vimscript.c index 99d1406cfb..acd89119f9 100644 --- a/src/nvim/api/vimscript.c +++ b/src/nvim/api/vimscript.c @@ -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))); } |