aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua
diff options
context:
space:
mode:
authorii14 <59243201+ii14@users.noreply.github.com>2023-04-01 02:49:51 +0200
committerGitHub <noreply@github.com>2023-04-01 08:49:51 +0800
commitd5f6176e6dc4b4e12fc5061ca6e87f4af533e46a (patch)
treeed51aa26f2b10c950c9bf2d7d035450335d01b55 /src/nvim/lua
parent83bfd94d1df5eecb8e4069a227c7d24598636d63 (diff)
downloadrneovim-d5f6176e6dc4b4e12fc5061ca6e87f4af533e46a.tar.gz
rneovim-d5f6176e6dc4b4e12fc5061ca6e87f4af533e46a.tar.bz2
rneovim-d5f6176e6dc4b4e12fc5061ca6e87f4af533e46a.zip
refactor: add const and remove unnecessary casts (#22841)
Diffstat (limited to 'src/nvim/lua')
-rw-r--r--src/nvim/lua/executor.c2
-rw-r--r--src/nvim/lua/stdlib.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index dfbbfe9ab5..b5dd7a3e78 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -623,7 +623,7 @@ static bool nlua_init_packages(lua_State *lstate, bool is_standalone)
lua_getglobal(lstate, "require");
lua_pushstring(lstate, "vim._init_packages");
if (nlua_pcall(lstate, 1, 0)) {
- os_errmsg((char *)lua_tostring(lstate, -1));
+ os_errmsg(lua_tostring(lstate, -1));
os_errmsg("\n");
return false;
}
diff --git a/src/nvim/lua/stdlib.c b/src/nvim/lua/stdlib.c
index ee5676e927..20a99b2836 100644
--- a/src/nvim/lua/stdlib.c
+++ b/src/nvim/lua/stdlib.c
@@ -288,7 +288,7 @@ int nlua_regex(lua_State *lstate)
regprog_T *prog = NULL;
TRY_WRAP(&err, {
- prog = vim_regcomp((char *)text, RE_AUTO | RE_MAGIC | RE_STRICT);
+ prog = vim_regcomp(text, RE_AUTO | RE_MAGIC | RE_STRICT);
});
if (ERROR_SET(&err)) {