diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-02-13 12:14:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 12:14:53 +0100 |
commit | ce5a9bfe7e537c81d34bd4a27fc6638f20114e67 (patch) | |
tree | 1eeeedcb0370d7c156f60ee53017149c8aac8c28 /src/nvim/buffer_updates.c | |
parent | 89135cff030b06f60cd596a9ae81cd9583987517 (diff) | |
parent | 1a3a8d903e9705ce41867e1cbc629a85c7cb6252 (diff) | |
download | rneovim-ce5a9bfe7e537c81d34bd4a27fc6638f20114e67.tar.gz rneovim-ce5a9bfe7e537c81d34bd4a27fc6638f20114e67.tar.bz2 rneovim-ce5a9bfe7e537c81d34bd4a27fc6638f20114e67.zip |
Merge pull request #27428 from bfredl/luarena
refactor(lua): use Arena when converting from lua stack to API args
Diffstat (limited to 'src/nvim/buffer_updates.c')
-rw-r--r-- | src/nvim/buffer_updates.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/buffer_updates.c b/src/nvim/buffer_updates.c index 1a02ac78d7..e725678937 100644 --- a/src/nvim/buffer_updates.c +++ b/src/nvim/buffer_updates.c @@ -179,7 +179,7 @@ void buf_updates_unload(buf_T *buf, bool can_reload) ADD_C(args, BUFFER_OBJ(buf->handle)); TEXTLOCK_WRAP({ - nlua_call_ref(thecb, keep ? "reload" : "detach", args, false, NULL); + nlua_call_ref(thecb, keep ? "reload" : "detach", args, false, NULL, NULL); }); } @@ -295,10 +295,10 @@ void buf_updates_send_changes(buf_T *buf, linenr_T firstline, int64_t num_added, Object res; TEXTLOCK_WRAP({ - res = nlua_call_ref(cb.on_lines, "lines", args, false, NULL); + res = nlua_call_ref(cb.on_lines, "lines", args, kRetNilBool, NULL, NULL); }); - if (res.type == kObjectTypeBoolean && res.data.boolean == true) { + if (LUARET_TRUTHY(res)) { buffer_update_callbacks_free(cb); keep = false; } @@ -345,10 +345,10 @@ void buf_updates_send_splice(buf_T *buf, int start_row, colnr_T start_col, bcoun Object res; TEXTLOCK_WRAP({ - res = nlua_call_ref(cb.on_bytes, "bytes", args, false, NULL); + res = nlua_call_ref(cb.on_bytes, "bytes", args, kRetNilBool, NULL, NULL); }); - if (res.type == kObjectTypeBoolean && res.data.boolean == true) { + if (LUARET_TRUTHY(res)) { buffer_update_callbacks_free(cb); keep = false; } @@ -381,10 +381,10 @@ void buf_updates_changedtick(buf_T *buf) Object res; TEXTLOCK_WRAP({ - res = nlua_call_ref(cb.on_changedtick, "changedtick", args, false, NULL); + res = nlua_call_ref(cb.on_changedtick, "changedtick", args, kRetNilBool, NULL, NULL); }); - if (res.type == kObjectTypeBoolean && res.data.boolean == true) { + if (LUARET_TRUTHY(res)) { buffer_update_callbacks_free(cb); keep = false; } |