aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/garray.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-21 09:24:09 +0800
committerGitHub <noreply@github.com>2023-01-21 09:24:09 +0800
commite86d2734a93e159d44df8132dee6b994e5922d18 (patch)
treee8a3015ebc88d880f9e749a7e69fbcf0d8793037 /src/nvim/garray.c
parent1c16d0994d08f1a6c396bc46833d0bfdade29422 (diff)
downloadrneovim-e86d2734a93e159d44df8132dee6b994e5922d18.tar.gz
rneovim-e86d2734a93e159d44df8132dee6b994e5922d18.tar.bz2
rneovim-e86d2734a93e159d44df8132dee6b994e5922d18.zip
refactor: use uint8_t for blobs and ga_append() (#21916)
A blob is used as a sequence of bytes and usually accessed individually, not as as a NUL-terminuated string, so uint8_t should be better. Not sure about ga_append(), but using uint8_t leads to fewer casts.
Diffstat (limited to 'src/nvim/garray.c')
-rw-r--r--src/nvim/garray.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/garray.c b/src/nvim/garray.c
index f75210bacb..aa9a44d410 100644
--- a/src/nvim/garray.c
+++ b/src/nvim/garray.c
@@ -216,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);
}