diff options
| author | bfredl <bjorn.linse@gmail.com> | 2022-05-07 16:40:00 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-07 16:40:00 +0200 | 
| commit | 03471e292d48283379a397dadf902572de91b359 (patch) | |
| tree | e0736597ec1b49250a128a58ae0f7e7e217c3f2f /src/nvim/eval/encode.c | |
| parent | eccb9896894f0e092b8d3c2519eb81b2a3fb3cca (diff) | |
| parent | 2a378e6e82cececb12339f2df51ffe107039d867 (diff) | |
| download | rneovim-03471e292d48283379a397dadf902572de91b359.tar.gz rneovim-03471e292d48283379a397dadf902572de91b359.tar.bz2 rneovim-03471e292d48283379a397dadf902572de91b359.zip  | |
Merge pull request #18425 from dundargoc/refactor/char_u/1
refactor: replace char_u variables and functions with char
Diffstat (limited to 'src/nvim/eval/encode.c')
| -rw-r--r-- | src/nvim/eval/encode.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c index 963837fefc..de93ddc70d 100644 --- a/src/nvim/eval/encode.c +++ b/src/nvim/eval/encode.c @@ -611,8 +611,8 @@ static inline int convert_to_json_string(garray_T *const gap, const char *const  #define ENCODE_RAW(ch) \    (ch >= 0x20 && utf_printable(ch))      for (size_t i = 0; i < utf_len;) { -      const int ch = utf_ptr2char((char_u *)utf_buf + i); -      const size_t shift = (ch == 0 ? 1 : ((size_t)utf_ptr2len((char_u *)utf_buf + i))); +      const int ch = utf_ptr2char(utf_buf + i); +      const size_t shift = (ch == 0 ? 1 : ((size_t)utf_ptr2len(utf_buf + i)));        assert(shift > 0);        i += shift;        switch (ch) { @@ -651,11 +651,11 @@ static inline int convert_to_json_string(garray_T *const gap, const char *const      ga_append(gap, '"');      ga_grow(gap, (int)str_len);      for (size_t i = 0; i < utf_len;) { -      const int ch = utf_ptr2char((char_u *)utf_buf + i); +      const int ch = utf_ptr2char(utf_buf + i);        const size_t shift = (ch == 0 ? 1 : ((size_t)utf_char2len(ch)));        assert(shift > 0);        // Is false on invalid unicode, but this should already be handled. -      assert(ch == 0 || shift == ((size_t)utf_ptr2len((char_u *)utf_buf + i))); +      assert(ch == 0 || shift == ((size_t)utf_ptr2len(utf_buf + i)));        switch (ch) {        case BS:        case TAB:  | 
