comparison src/userfunc.c @ 13244:ac42c4b11dbc v8.0.1496

patch 8.0.1496: clearing a pointer takes two lines commit https://github.com/vim/vim/commit/d23a823669d93fb2a570a039173eefe4856ac806 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 10 18:45:26 2018 +0100 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)
author Christian Brabandt <cb@256bit.org>
date Sat, 10 Feb 2018 19:00:07 +0100
parents 30f9a62f5f51
children 69278c25429d
comparison
equal deleted inserted replaced
13243:899b19739188 13244:ac42c4b11dbc
2120 if (skip_until != NULL) 2120 if (skip_until != NULL)
2121 { 2121 {
2122 /* between ":append" and "." and between ":python <<EOF" and "EOF" 2122 /* between ":append" and "." and between ":python <<EOF" and "EOF"
2123 * don't check for ":endfunc". */ 2123 * don't check for ":endfunc". */
2124 if (STRCMP(theline, skip_until) == 0) 2124 if (STRCMP(theline, skip_until) == 0)
2125 { 2125 VIM_CLEAR(skip_until);
2126 vim_free(skip_until);
2127 skip_until = NULL;
2128 }
2129 } 2126 }
2130 else 2127 else
2131 { 2128 {
2132 /* skip ':' and blanks*/ 2129 /* skip ':' and blanks*/
2133 for (p = theline; VIM_ISWHITE(*p) || *p == ':'; ++p) 2130 for (p = theline; VIM_ISWHITE(*p) || *p == ':'; ++p)
2293 else 2290 else
2294 { 2291 {
2295 /* redefine existing function */ 2292 /* redefine existing function */
2296 ga_clear_strings(&(fp->uf_args)); 2293 ga_clear_strings(&(fp->uf_args));
2297 ga_clear_strings(&(fp->uf_lines)); 2294 ga_clear_strings(&(fp->uf_lines));
2298 vim_free(name); 2295 VIM_CLEAR(name);
2299 name = NULL;
2300 } 2296 }
2301 } 2297 }
2302 } 2298 }
2303 else 2299 else
2304 { 2300 {