diff options
author | Dundar Goc <gocdundar@gmail.com> | 2022-07-31 16:20:57 +0200 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2022-08-25 18:59:12 +0200 |
commit | 40855b0143a864739a6037921e15699445dcf8a7 (patch) | |
tree | 61c7e85a2cad6ca5d97fd436056ce34d4a655698 /src/nvim/eval.c | |
parent | 22f920030214c0023525c59daf763441baddba1a (diff) | |
download | rneovim-40855b0143a864739a6037921e15699445dcf8a7.tar.gz rneovim-40855b0143a864739a6037921e15699445dcf8a7.tar.bz2 rneovim-40855b0143a864739a6037921e15699445dcf8a7.zip |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
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 1458d1ff36..6d37106143 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2192,7 +2192,7 @@ int pattern_match(char *pat, char *text, bool ic) // avoid 'l' flag in 'cpoptions' char *save_cpo = p_cpo; - p_cpo = (char *)empty_option; + p_cpo = empty_option; regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING); if (regmatch.regprog != NULL) { regmatch.rm_ic = ic; @@ -8326,7 +8326,7 @@ char *do_string_sub(char *str, char *pat, char *sub, typval_T *expr, char *flags // Make 'cpoptions' empty, so that the 'l' flag doesn't work here char *save_cpo = p_cpo; - p_cpo = (char *)empty_option; + p_cpo = empty_option; ga_init(&ga, 1, 200); @@ -8386,7 +8386,7 @@ char *do_string_sub(char *str, char *pat, char *sub, typval_T *expr, char *flags char *ret = xstrdup(ga.ga_data == NULL ? str : ga.ga_data); ga_clear(&ga); - if ((char_u *)p_cpo == empty_option) { + if (p_cpo == empty_option) { p_cpo = save_cpo; } else { // Darn, evaluating {sub} expression or {expr} changed the value. @@ -8395,7 +8395,7 @@ char *do_string_sub(char *str, char *pat, char *sub, typval_T *expr, char *flags if (*p_cpo == NUL) { set_option_value_give_err("cpo", 0L, save_cpo, 0); } - free_string_option((char_u *)save_cpo); + free_string_option(save_cpo); } return ret; |