diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-06-07 18:19:59 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-09-28 14:55:43 +0200 |
commit | 1e9e2451bef21ff705e677802d1b0980356f1f86 (patch) | |
tree | 27ea9d1f928b9de46d864bf348ddfa196ae2d127 /src | |
parent | 005b6d638caa200711bf5960e0c0d70ba5721c94 (diff) | |
download | rneovim-1e9e2451bef21ff705e677802d1b0980356f1f86.tar.gz rneovim-1e9e2451bef21ff705e677802d1b0980356f1f86.tar.bz2 rneovim-1e9e2451bef21ff705e677802d1b0980356f1f86.zip |
tree-sitter: objectify API
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/lua/executor.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 1794cee8d8..a6447ebb2b 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -822,16 +822,6 @@ void ex_luafile(exarg_T *const eap) } } -static int unsafe_ptr_to_ts_tree(lua_State *L) -{ - if (!lua_gettop(L)) { - return 0; - } - TSTree *const *ptr = lua_topointer(L,1); - tslua_push_tree(L, *ptr); - return 1; -} - static int create_tslua_parser(lua_State *L) { if (lua_gettop(L) < 2) { @@ -867,9 +857,7 @@ static int create_tslua_parser(lua_State *L) static void nlua_add_treesitter(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL { tslua_init(lstate); - lua_pushcfunction(lstate, unsafe_ptr_to_ts_tree); - lua_setfield(lstate, -2, "unsafe_ts_tree"); lua_pushcfunction(lstate, create_tslua_parser); - lua_setfield(lstate, -2, "ts_parser"); + lua_setfield(lstate, -2, "_create_ts_parser"); } |