refactor: remove char_u (#22829)

Closes https://github.com/neovim/neovim/issues/459
This commit is contained in:
dundargoc
2023-04-02 10:11:42 +02:00
committed by GitHub
parent 9084948893
commit d510bfbc8e
40 changed files with 340 additions and 1965 deletions

View File

@@ -6197,7 +6197,7 @@ static void f_resolve(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
}
# else
char *v = os_realpath(fname, NULL);
rettv->vval.v_string = (char_u *)(v == NULL ? xstrdup(fname) : v);
rettv->vval.v_string = v == NULL ? xstrdup(fname) : v;
# endif
#endif

View File

@@ -206,7 +206,7 @@ typedef struct {
struct { \
typval_T di_tv; /* Structure that holds scope dictionary itself. */ \
uint8_t di_flags; /* Flags. */ \
char_u di_key[__VA_ARGS__]; /* Key value. */ /* NOLINT(runtime/arrays)*/ \
char di_key[__VA_ARGS__]; /* Key value. */ /* NOLINT(runtime/arrays)*/ \
}
/// Structure to hold a scope dictionary

View File

@@ -90,7 +90,7 @@ static int get_function_args(char **argp, char endchar, garray_T *newargs, int *
bool mustend = false;
char *arg = *argp;
char *p = arg;
char_u c;
uint8_t c;
int i;
if (newargs != NULL) {
@@ -128,7 +128,7 @@ static int get_function_args(char **argp, char endchar, garray_T *newargs, int *
}
if (newargs != NULL) {
ga_grow(newargs, 1);
c = (char_u)(*p);
c = (uint8_t)(*p);
*p = NUL;
arg = xstrdup(arg);
@@ -159,7 +159,7 @@ static int get_function_args(char **argp, char endchar, garray_T *newargs, int *
while (p > expr && ascii_iswhite(p[-1])) {
p--;
}
c = (char_u)(*p);
c = (uint8_t)(*p);
*p = NUL;
expr = xstrdup(expr);
((char **)(default_args->ga_data))[default_args->ga_len] = expr;