diff options
author | ZviRackover <zvirack@gmail.com> | 2018-09-02 00:58:30 +0300 |
---|---|---|
committer | ZviRackover <zvirack@gmail.com> | 2018-09-09 10:45:50 +0300 |
commit | cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278 (patch) | |
tree | 5d82993e830a807647ec81aad1d5a391e4490cb0 /src/nvim/eval.c | |
parent | 50eadfe2e991a0bb5fe0f98377d91702f0a20492 (diff) | |
download | rneovim-cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278.tar.gz rneovim-cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278.tar.bz2 rneovim-cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278.zip |
Refactor: Remove occurences of mb_char2bytes
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d750a47588..b56032437b 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -4719,7 +4719,7 @@ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate) /* For "\u" store the number according to * 'encoding'. */ if (c != 'X') - name += (*mb_char2bytes)(nr, name); + name += utf_char2bytes(nr, name); else *name++ = nr; } @@ -9478,7 +9478,7 @@ static void f_getchar(typval_T *argvars, typval_T *rettv, FunPtr fptr) temp[i++] = K_SECOND(n); temp[i++] = K_THIRD(n); } else if (has_mbyte) - i += (*mb_char2bytes)(n, temp + i); + i += utf_char2bytes(n, temp + i); else temp[i++] = n; temp[i++] = NUL; @@ -10010,7 +10010,7 @@ static void f_getmatches(typval_T *argvars, typval_T *rettv, FunPtr fptr) if (cur->conceal_char) { char buf[MB_MAXBYTES + 1]; - buf[(*mb_char2bytes)((int)cur->conceal_char, (char_u *)buf)] = NUL; + buf[utf_char2bytes((int)cur->conceal_char, (char_u *)buf)] = NUL; tv_dict_add_str(dict, S_LEN("conceal"), buf); } @@ -18347,7 +18347,7 @@ void set_vim_var_char(int c) char buf[MB_MAXBYTES + 1]; if (has_mbyte) { - buf[(*mb_char2bytes)(c, (char_u *) buf)] = NUL; + buf[utf_char2bytes(c, (char_u *) buf)] = NUL; } else { buf[0] = c; buf[1] = NUL; |