From e86d2734a93e159d44df8132dee6b994e5922d18 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 21 Jan 2023 09:24:09 +0800 Subject: 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. --- src/nvim/eval/executor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/eval/executor.c') diff --git a/src/nvim/eval/executor.c b/src/nvim/eval/executor.c index 831c468288..9caea2fef1 100644 --- a/src/nvim/eval/executor.c +++ b/src/nvim/eval/executor.c @@ -51,7 +51,7 @@ int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2, const char *cons blob_T *const b1 = tv1->vval.v_blob; blob_T *const b2 = tv2->vval.v_blob; for (int i = 0; i < tv_blob_len(b2); i++) { - ga_append(&b1->bv_ga, (char)tv_blob_get(b2, i)); + ga_append(&b1->bv_ga, tv_blob_get(b2, i)); } } return OK; -- cgit