diff options
author | Dundar Göc <gocdundar@gmail.com> | 2022-08-26 23:11:25 +0200 |
---|---|---|
committer | dundargoc <gocdundar@gmail.com> | 2022-09-06 16:44:37 +0200 |
commit | 73207cae611a1efb8cd17139e8228772daeb9866 (patch) | |
tree | f3efc08ff875266b5abf57f6ef4610450180e516 /src/nvim/strings.c | |
parent | 87e037e26cfd53c3c34ac9029a8833023af60a56 (diff) | |
download | rneovim-73207cae611a1efb8cd17139e8228772daeb9866.tar.gz rneovim-73207cae611a1efb8cd17139e8228772daeb9866.tar.bz2 rneovim-73207cae611a1efb8cd17139e8228772daeb9866.zip |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/strings.c')
-rw-r--r-- | src/nvim/strings.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/nvim/strings.c b/src/nvim/strings.c index d7a0472cbf..04f9311d7e 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -49,13 +49,6 @@ #include "nvim/vim.h" #include "nvim/window.h" -/// Copy "string" into newly allocated memory. -char_u *vim_strsave(const char_u *string) - FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC FUNC_ATTR_NONNULL_ALL -{ - return (char_u *)xstrdup((char *)string); -} - /// Copy up to `len` bytes of `string` into newly allocated memory and /// terminate with a NUL. The allocated memory always has size `len + 1`, even /// when `string` is shorter. @@ -292,11 +285,11 @@ char_u *vim_strsave_shellescape(const char_u *string, bool do_special, bool do_n char_u *vim_strsave_up(const char_u *string) FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC FUNC_ATTR_NONNULL_ALL { - char_u *p1; + char *p1; - p1 = vim_strsave(string); - vim_strup(p1); - return p1; + p1 = xstrdup((char *)string); + vim_strup((char_u *)p1); + return (char_u *)p1; } /// Like xstrnsave(), but make all characters uppercase. |