mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 09:56:31 +00:00
lua: cleanup naming conventions of executor functions
This commit is contained in:
@@ -212,10 +212,10 @@ Boolean nvim_buf_attach(uint64_t channel_id,
|
||||
|
||||
error:
|
||||
// TODO(bfredl): ASAN build should check that the ref table is empty?
|
||||
executor_free_luaref(cb.on_lines);
|
||||
executor_free_luaref(cb.on_bytes);
|
||||
executor_free_luaref(cb.on_changedtick);
|
||||
executor_free_luaref(cb.on_detach);
|
||||
api_free_luaref(cb.on_lines);
|
||||
api_free_luaref(cb.on_bytes);
|
||||
api_free_luaref(cb.on_changedtick);
|
||||
api_free_luaref(cb.on_detach);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -247,10 +247,10 @@ Boolean nvim_buf_detach(uint64_t channel_id,
|
||||
static void buf_clear_luahl(buf_T *buf, bool force)
|
||||
{
|
||||
if (buf->b_luahl || force) {
|
||||
executor_free_luaref(buf->b_luahl_start);
|
||||
executor_free_luaref(buf->b_luahl_window);
|
||||
executor_free_luaref(buf->b_luahl_line);
|
||||
executor_free_luaref(buf->b_luahl_end);
|
||||
api_free_luaref(buf->b_luahl_start);
|
||||
api_free_luaref(buf->b_luahl_window);
|
||||
api_free_luaref(buf->b_luahl_line);
|
||||
api_free_luaref(buf->b_luahl_end);
|
||||
}
|
||||
buf->b_luahl_start = LUA_NOREF;
|
||||
buf->b_luahl_window = LUA_NOREF;
|
||||
|
@@ -1198,7 +1198,7 @@ void api_free_object(Object value)
|
||||
break;
|
||||
|
||||
case kObjectTypeLuaRef:
|
||||
executor_free_luaref(value.data.luaref);
|
||||
api_free_luaref(value.data.luaref);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@@ -475,7 +475,7 @@ Object nvim_execute_lua(String code, Array args, Error *err)
|
||||
FUNC_API_DEPRECATED_SINCE(7)
|
||||
FUNC_API_REMOTE_ONLY
|
||||
{
|
||||
return executor_exec_lua_api(code, args, err);
|
||||
return nlua_exec(code, args, err);
|
||||
}
|
||||
|
||||
/// Execute Lua code. Parameters (if any) are available as `...` inside the
|
||||
@@ -494,7 +494,7 @@ Object nvim_exec_lua(String code, Array args, Error *err)
|
||||
FUNC_API_SINCE(7)
|
||||
FUNC_API_REMOTE_ONLY
|
||||
{
|
||||
return executor_exec_lua_api(code, args, err);
|
||||
return nlua_exec(code, args, err);
|
||||
}
|
||||
|
||||
/// Calls a VimL function.
|
||||
@@ -2477,7 +2477,7 @@ Array nvim_get_proc_children(Integer pid, Error *err)
|
||||
Array a = ARRAY_DICT_INIT;
|
||||
ADD(a, INTEGER_OBJ(pid));
|
||||
String s = cstr_to_string("return vim._os_proc_children(select(1, ...))");
|
||||
Object o = nvim_exec_lua(s, a, err);
|
||||
Object o = nlua_exec(s, a, err);
|
||||
api_free_string(s);
|
||||
api_free_array(a);
|
||||
if (o.type == kObjectTypeArray) {
|
||||
@@ -2523,7 +2523,7 @@ Object nvim_get_proc(Integer pid, Error *err)
|
||||
Array a = ARRAY_DICT_INIT;
|
||||
ADD(a, INTEGER_OBJ(pid));
|
||||
String s = cstr_to_string("return vim._os_proc_info(select(1, ...))");
|
||||
Object o = nvim_exec_lua(s, a, err);
|
||||
Object o = nlua_exec(s, a, err);
|
||||
api_free_string(s);
|
||||
api_free_array(a);
|
||||
if (o.type == kObjectTypeArray && o.data.array.size == 0) {
|
||||
|
Reference in New Issue
Block a user