0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.0.1496: clearing a pointer takes two lines

Problem:    Clearing a pointer takes two lines.
Solution:   Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi,
            closes #2629)
This commit is contained in:
Bram Moolenaar
2018-02-10 18:45:26 +01:00
parent 42443c7d7f
commit d23a823669
54 changed files with 233 additions and 465 deletions

View File

@@ -2122,10 +2122,7 @@ ex_function(exarg_T *eap)
/* between ":append" and "." and between ":python <<EOF" and "EOF"
* don't check for ":endfunc". */
if (STRCMP(theline, skip_until) == 0)
{
vim_free(skip_until);
skip_until = NULL;
}
VIM_CLEAR(skip_until);
}
else
{
@@ -2295,8 +2292,7 @@ ex_function(exarg_T *eap)
/* redefine existing function */
ga_clear_strings(&(fp->uf_args));
ga_clear_strings(&(fp->uf_lines));
vim_free(name);
name = NULL;
VIM_CLEAR(name);
}
}
}