diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-04-19 21:11:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 21:11:12 +0200 |
commit | e81331c2b0b6490cfc4204ffd41b7d3df6b2cd8b (patch) | |
tree | 0cc40cde87dd971c75f49e079649c259b300b6ab /src/nvim/generators/gen_api_ui_events.lua | |
parent | 706f871014b46300180156590ff269ee38473989 (diff) | |
parent | 1e60e8c0406f6b4b51c51abb5f53e25bd52fee5e (diff) | |
download | rneovim-e81331c2b0b6490cfc4204ffd41b7d3df6b2cd8b.tar.gz rneovim-e81331c2b0b6490cfc4204ffd41b7d3df6b2cd8b.tar.bz2 rneovim-e81331c2b0b6490cfc4204ffd41b7d3df6b2cd8b.zip |
Merge pull request #23106 from bfredl/nlua0
refactor(build): use vendored versions of mpack and luabitop
Diffstat (limited to 'src/nvim/generators/gen_api_ui_events.lua')
-rwxr-xr-x | src/nvim/generators/gen_api_ui_events.lua | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/nvim/generators/gen_api_ui_events.lua b/src/nvim/generators/gen_api_ui_events.lua index bbc6252f14..c6a5d1d2a3 100755 --- a/src/nvim/generators/gen_api_ui_events.lua +++ b/src/nvim/generators/gen_api_ui_events.lua @@ -1,19 +1,15 @@ local mpack = require('mpack') -local nvimdir = arg[1] -package.path = nvimdir .. '/?.lua;' .. package.path - -assert(#arg == 6) -local input = io.open(arg[2], 'rb') -local call_output = io.open(arg[3], 'wb') -local remote_output = io.open(arg[4], 'wb') -local metadata_output = io.open(arg[5], 'wb') -local client_output = io.open(arg[6], 'wb') +assert(#arg == 5) +local input = io.open(arg[1], 'rb') +local call_output = io.open(arg[2], 'wb') +local remote_output = io.open(arg[3], 'wb') +local metadata_output = io.open(arg[4], 'wb') +local client_output = io.open(arg[5], 'wb') local c_grammar = require('generators.c_grammar') local events = c_grammar.grammar:match(input:read('*all')) -_G.vim = loadfile(nvimdir..'/../../runtime/lua/vim/shared.lua')() local hashy = require'generators.hashy' local function write_signature(output, ev, prefix, notype) @@ -194,7 +190,7 @@ for _,ev in ipairs(events) do end end -local packed = mpack.pack(exported_events) +local packed = mpack.encode(exported_events) local dump_bin_array = require("generators.dump_bin_array") dump_bin_array(metadata_output, 'ui_events_metadata', packed) metadata_output:close() |