mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -378,7 +378,7 @@ char_u *deref_func_name(const char *name, int *lenp, partial_T **const partialp,
|
||||
*lenp = 0;
|
||||
return (char_u *)"";
|
||||
}
|
||||
*lenp = (int)STRLEN(v->di_tv.vval.v_string);
|
||||
*lenp = (int)strlen(v->di_tv.vval.v_string);
|
||||
return (char_u *)v->di_tv.vval.v_string;
|
||||
}
|
||||
|
||||
@@ -970,11 +970,11 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett
|
||||
snprintf((char *)numbuf, sizeof(numbuf), "%d", ai + 1);
|
||||
name = (char *)numbuf;
|
||||
}
|
||||
if (fixvar_idx < FIXVAR_CNT && STRLEN(name) <= VAR_SHORT_LEN) {
|
||||
if (fixvar_idx < FIXVAR_CNT && strlen(name) <= VAR_SHORT_LEN) {
|
||||
v = (dictitem_T *)&fc->fixvar[fixvar_idx++];
|
||||
v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
|
||||
} else {
|
||||
v = xmalloc(sizeof(dictitem_T) + STRLEN(name));
|
||||
v = xmalloc(sizeof(dictitem_T) + strlen(name));
|
||||
v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX | DI_FLAGS_ALLOC;
|
||||
}
|
||||
STRCPY(v->di_key, name);
|
||||
@@ -1455,7 +1455,7 @@ int call_func(const char *funcname, int len, typval_T *rettv, int argcount_in, t
|
||||
rettv->v_type = VAR_UNKNOWN;
|
||||
|
||||
if (len <= 0) {
|
||||
len = (int)STRLEN(funcname);
|
||||
len = (int)strlen(funcname);
|
||||
}
|
||||
if (partial != NULL) {
|
||||
fp = partial->pt_func;
|
||||
@@ -2054,7 +2054,7 @@ void ex_function(exarg_T *eap)
|
||||
msg_putchar(' ');
|
||||
}
|
||||
}
|
||||
msg_prt_line((char_u *)FUNCLINE(fp, j), false);
|
||||
msg_prt_line(FUNCLINE(fp, j), false);
|
||||
ui_flush(); // show a line at a time
|
||||
os_breakcheck();
|
||||
}
|
||||
@@ -2270,8 +2270,8 @@ void ex_function(exarg_T *eap)
|
||||
} else if (line_arg != NULL && *skipwhite((char *)line_arg) != NUL) {
|
||||
nextcmd = line_arg;
|
||||
} else if (*p != NUL && *p != '"' && p_verbose > 0) {
|
||||
give_warning2((char_u *)_("W22: Text found after :endfunction: %s"),
|
||||
p, true);
|
||||
give_warning2(_("W22: Text found after :endfunction: %s"),
|
||||
(char *)p, true);
|
||||
}
|
||||
if (nextcmd != NULL) {
|
||||
// Another command follows. If the line came from "eap" we
|
||||
|
Reference in New Issue
Block a user