lua: cleanup naming conventions of executor functions

This commit is contained in:
Björn Linse
2020-09-03 11:11:53 +02:00
parent 5581ac88c6
commit 5f3ddb195e
11 changed files with 64 additions and 46 deletions

View File

@@ -158,7 +158,7 @@ void buf_updates_unregister_all(buf_T *buf)
args.items[0] = BUFFER_OBJ(buf->handle);
textlock++;
executor_exec_lua_cb(cb.on_detach, "detach", args, false, NULL);
nlua_call_ref(cb.on_detach, "detach", args, false, NULL);
textlock--;
}
free_update_callbacks(cb);
@@ -266,7 +266,7 @@ void buf_updates_send_changes(buf_T *buf,
args.items[7] = INTEGER_OBJ((Integer)deleted_codeunits);
}
textlock++;
Object res = executor_exec_lua_cb(cb.on_lines, "lines", args, true, NULL);
Object res = nlua_call_ref(cb.on_lines, "lines", args, true, NULL);
textlock--;
if (res.type == kObjectTypeBoolean && res.data.boolean == true) {
@@ -317,7 +317,7 @@ void buf_updates_send_splice(
args.items[10] = INTEGER_OBJ(new_byte);
textlock++;
Object res = executor_exec_lua_cb(cb.on_bytes, "bytes", args, true, NULL);
Object res = nlua_call_ref(cb.on_bytes, "bytes", args, true, NULL);
textlock--;
if (res.type == kObjectTypeBoolean && res.data.boolean == true) {
@@ -352,8 +352,8 @@ void buf_updates_changedtick(buf_T *buf)
args.items[1] = INTEGER_OBJ(buf_get_changedtick(buf));
textlock++;
Object res = executor_exec_lua_cb(cb.on_changedtick, "changedtick",
args, true, NULL);
Object res = nlua_call_ref(cb.on_changedtick, "changedtick",
args, true, NULL);
textlock--;
if (res.type == kObjectTypeBoolean && res.data.boolean == true) {
@@ -387,6 +387,6 @@ void buf_updates_changedtick_single(buf_T *buf, uint64_t channel_id)
static void free_update_callbacks(BufUpdateCallbacks cb)
{
executor_free_luaref(cb.on_lines);
executor_free_luaref(cb.on_changedtick);
api_free_luaref(cb.on_lines);
api_free_luaref(cb.on_changedtick);
}