mirror of
https://github.com/neovim/neovim.git
synced 2026-05-28 15:55:34 +00:00
Merge pull request #40018 from bfredl/neoziglua
fix(build): ziglua API change (very very minorly)
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
|
||||
.dependencies = .{
|
||||
.zlua = .{
|
||||
.url = "git+https://github.com/natecraddock/ziglua#c09d0cb9f8175c1c02fbeae51940cfab15f3e085",
|
||||
.hash = "zlua-0.1.0-hGRpC1hWBQAhR6kPtfypQ1Awn09a9JWpIuErNKPCMwSq",
|
||||
.url = "git+https://github.com/natecraddock/ziglua#8f271c82baa5fc43aa02a72f6da020c2025d9436",
|
||||
.hash = "zlua-0.1.0-hGRpC2aABQD4D9PBVH3wAW8k32-I4969MRQ0CpOwoley",
|
||||
},
|
||||
.lpeg = .{
|
||||
.url = "https://github.com/neovim/deps/raw/d495ee6f79e7962a53ad79670cb92488abe0b9b4/opt/lpeg-1.1.0.tar.gz",
|
||||
|
||||
@@ -39,7 +39,7 @@ fn init_lua() !*Lua {
|
||||
lua.call(.{ .results = 1 });
|
||||
lua.setField(-2, "iter");
|
||||
|
||||
_ = try lua.getGlobal("package");
|
||||
_ = lua.getGlobal("package");
|
||||
_ = lua.getField(-1, "preload");
|
||||
try lua.loadBuffer(hashy, "hashy.lua"); // [package, preload, hashy]
|
||||
lua.setField(-2, "gen.hashy");
|
||||
@@ -90,11 +90,11 @@ pub fn main(init: std.process.Init) !void {
|
||||
if (i == 0) {
|
||||
firstarg = try lua.toString(-1); // preserved on lua heap..
|
||||
}
|
||||
lua.rawSetIndex(-2, @intCast(i));
|
||||
lua.setIndexRaw(-2, @intCast(i));
|
||||
}
|
||||
lua.setGlobal("arg");
|
||||
|
||||
_ = try lua.getGlobal("debug");
|
||||
_ = lua.getGlobal("debug");
|
||||
_ = lua.getField(-1, "traceback");
|
||||
try lua.loadFile(firstarg);
|
||||
lua.protectedCall(.{ .msg_handler = -2 }) catch |e| {
|
||||
|
||||
Reference in New Issue
Block a user