diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-03 08:24:22 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-03 08:24:48 +0800 |
commit | 2ae0d32a72c3ee207b6f9cd48c4beffa6e7c774f (patch) | |
tree | 345bdaf306f0949f32ba41800821842da0326d1c /src/nvim/lua/executor.c | |
parent | 10c50d9f30138e7811789ba1c62f4c520cf04c8f (diff) | |
download | rneovim-2ae0d32a72c3ee207b6f9cd48c4beffa6e7c774f.tar.gz rneovim-2ae0d32a72c3ee207b6f9cd48c4beffa6e7c774f.tar.bz2 rneovim-2ae0d32a72c3ee207b6f9cd48c4beffa6e7c774f.zip |
refactor: make sure getting a callback doesn't modify argument
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 5380559baf..48ab2e3d70 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -1845,7 +1845,7 @@ static int nlua_is_thread(lua_State *lstate) return 1; } -bool nlua_is_table_from_lua(typval_T *const arg) +bool nlua_is_table_from_lua(const typval_T *const arg) { if (arg->v_type == VAR_DICT) { return arg->vval.v_dict->lua_table_ref != LUA_NOREF; @@ -1856,7 +1856,7 @@ bool nlua_is_table_from_lua(typval_T *const arg) } } -char_u *nlua_register_table_as_callable(typval_T *const arg) +char_u *nlua_register_table_as_callable(const typval_T *const arg) { LuaRef table_ref = LUA_NOREF; if (arg->v_type == VAR_DICT) { |