mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
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.
This commit is contained in:
@@ -98,7 +98,7 @@ static void ga_concat_esc(garray_T *gap, const char *p, int clen)
|
||||
vim_snprintf(buf, NUMBUFLEN, "\\x%02x", *p);
|
||||
ga_concat(gap, buf);
|
||||
} else {
|
||||
ga_append(gap, *p);
|
||||
ga_append(gap, (uint8_t)(*p));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user