aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/context.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-11-26 18:58:45 +0100
committerGitHub <noreply@github.com>2022-11-26 18:58:45 +0100
commit019c8805e514428c0b999583f5aec8c9f4eb96d0 (patch)
tree1a105862628c997b46725b4f3f485bd074332cce /src/nvim/context.c
parent319fbffc94896dd9cf0a77891d69b7fcada1fad4 (diff)
parentbd22585061b66d7f71d4832b4a81e950b3c9d19d (diff)
downloadrneovim-019c8805e514428c0b999583f5aec8c9f4eb96d0.tar.gz
rneovim-019c8805e514428c0b999583f5aec8c9f4eb96d0.tar.bz2
rneovim-019c8805e514428c0b999583f5aec8c9f4eb96d0.zip
Merge pull request #20196 from dundargoc/refactor/char_u/14
refactor: replace char_u with char 14: remove `STRLEN` part final
Diffstat (limited to 'src/nvim/context.c')
-rw-r--r--src/nvim/context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/context.c b/src/nvim/context.c
index 5ea843e023..47e60373bf 100644
--- a/src/nvim/context.c
+++ b/src/nvim/context.c
@@ -263,12 +263,12 @@ static inline void ctx_save_funcs(Context *ctx, bool scriptonly)
Error err = ERROR_INIT;
HASHTAB_ITER(func_tbl_get(), hi, {
- const char_u *const name = hi->hi_key;
+ const char *const name = hi->hi_key;
bool islambda = (STRNCMP(name, "<lambda>", 8) == 0);
- bool isscript = (name[0] == K_SPECIAL);
+ bool isscript = ((uint8_t)name[0] == K_SPECIAL);
if (!islambda && (!scriptonly || isscript)) {
- size_t cmd_len = sizeof("func! ") + STRLEN(name);
+ size_t cmd_len = sizeof("func! ") + strlen(name);
char *cmd = xmalloc(cmd_len);
snprintf(cmd, cmd_len, "func! %s", name);
String func_body = nvim_exec(VIML_INTERNAL_CALL, cstr_as_string(cmd),