refactor: replace char_u variables and functions with char

Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
Dundar Goc
2022-05-04 22:35:50 +02:00
parent d9ec57e16a
commit 2a378e6e82
51 changed files with 508 additions and 506 deletions

View File

@@ -375,7 +375,7 @@ static inline int parse_json_string(const char *const buf, const size_t buf_len,
"inside string: %.*s"), LENP(p, e));
goto parse_json_string_fail;
}
const int ch = utf_ptr2char((char_u *)p);
const int ch = utf_ptr2char(p);
// All characters above U+007F are encoded using two or more bytes
// and thus cannot possibly be equal to *p. But utf_ptr2char({0xFF,
// 0}) will return 0xFF, even though 0xFF cannot start any UTF-8
@@ -392,7 +392,7 @@ static inline int parse_json_string(const char *const buf, const size_t buf_len,
goto parse_json_string_fail;
}
const size_t ch_len = (size_t)utf_char2len(ch);
assert(ch_len == (size_t)(ch ? utf_ptr2len((char_u *)p) : 1));
assert(ch_len == (size_t)(ch ? utf_ptr2len(p) : 1));
len += ch_len;
p += ch_len;
}