diff options
Diffstat (limited to 'src/nvim/garray.c')
-rw-r--r-- | src/nvim/garray.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/nvim/garray.c b/src/nvim/garray.c index 6c63ce5a7c..aa9a44d410 100644 --- a/src/nvim/garray.c +++ b/src/nvim/garray.c @@ -5,22 +5,17 @@ /// /// Functions for handling growing arrays. -#include <inttypes.h> #include <string.h> -#include "nvim/ascii.h" #include "nvim/garray.h" #include "nvim/log.h" #include "nvim/memory.h" #include "nvim/path.h" #include "nvim/strings.h" -#include "nvim/vim.h" - -// #include "nvim/globals.h" -#include "nvim/memline.h" +#include "nvim/types.h" #ifdef INCLUDE_GENERATED_DECLARATIONS -# include "garray.c.generated.h" +# include "garray.c.generated.h" // IWYU pragma: export #endif /// Clear an allocated growing array. @@ -167,7 +162,7 @@ char *ga_concat_strings_sep(const garray_T *gap, const char *sep) s = xstpcpy(s, strings[i]); s = xstpcpy(s, sep); } - strcpy(s, strings[nelem - 1]); + strcpy(s, strings[nelem - 1]); // NOLINT(runtime/printf) return ret; } @@ -178,9 +173,9 @@ char *ga_concat_strings_sep(const garray_T *gap, const char *sep) /// @param gap /// /// @returns the concatenated strings -char_u *ga_concat_strings(const garray_T *gap) FUNC_ATTR_NONNULL_RET +char *ga_concat_strings(const garray_T *gap) FUNC_ATTR_NONNULL_RET { - return (char_u *)ga_concat_strings_sep(gap, ","); + return ga_concat_strings_sep(gap, ","); } /// Concatenate a string to a growarray which contains characters. @@ -221,7 +216,7 @@ void ga_concat_len(garray_T *const gap, const char *restrict s, const size_t len /// /// @param gap /// @param c -void ga_append(garray_T *gap, char c) +void ga_append(garray_T *gap, uint8_t c) { - GA_APPEND(char, gap, c); + GA_APPEND(uint8_t, gap, c); } |