fix(build): ziglua API change (very very minorly)

This commit is contained in:
bfredl
2026-05-27 11:20:49 +02:00
parent b3dfa86e02
commit dd5b738ffc
2 changed files with 5 additions and 5 deletions

View File

@@ -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",

View File

@@ -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| {