aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/converter.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-04-03 17:48:39 +0200
committerGitHub <noreply@github.com>2021-04-03 17:48:39 +0200
commit804ea22944146a6607859dbfcf35d24946b065e2 (patch)
tree94d3ebac9ae1bcbbf45cc000e644155e419d39ba /src/nvim/lua/converter.c
parentabdda664108646a8f1bd3112abb8083d721d38e6 (diff)
parent2df527e1ff1c599448b6b21953132c0022a8b9ad (diff)
downloadrneovim-804ea22944146a6607859dbfcf35d24946b065e2.tar.gz
rneovim-804ea22944146a6607859dbfcf35d24946b065e2.tar.bz2
rneovim-804ea22944146a6607859dbfcf35d24946b065e2.zip
Merge pull request #14226 from bfredl/luarefcount
lua: track reference ownership with ASAN when present
Diffstat (limited to 'src/nvim/lua/converter.c')
-rw-r--r--src/nvim/lua/converter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/lua/converter.c b/src/nvim/lua/converter.c
index 83b3729ad3..ce8c9b0d06 100644
--- a/src/nvim/lua/converter.c
+++ b/src/nvim/lua/converter.c
@@ -400,7 +400,6 @@ nlua_pop_typval_table_processing_end:
case LUA_TFUNCTION: {
LuaCFunctionState *state = xmalloc(sizeof(LuaCFunctionState));
state->lua_callable.func_ref = nlua_ref(lstate, -1);
- state->lua_callable.table_ref = LUA_NOREF;
char_u *name = register_cfunc(
&nlua_CFunction_func_call,
@@ -412,6 +411,7 @@ nlua_pop_typval_table_processing_end:
break;
}
case LUA_TUSERDATA: {
+ // TODO(bfredl): check mt.__call and convert to function?
nlua_pushref(lstate, nlua_nil_ref);
bool is_nil = lua_rawequal(lstate, -2, -1);
lua_pop(lstate, 1);