Skip to content

Commit 5a7269e

Browse files
axdanknatecraddock
authored andcommitted
use lua_objlen for luajit in rawLen function
1 parent f28836c commit 5a7269e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ pub const Lua = opaque {
16571657
/// See https://www.lua.org/manual/5.4/manual.html#lua_rawlen
16581658
pub fn rawLen(lua: *Lua, index: i32) usize {
16591659
switch (lang) {
1660-
.lua51, .luau => return @intCast(c.lua_objlen(@ptrCast(lua), index)),
1660+
.lua51, .luau, .luajit => return @intCast(c.lua_objlen(@ptrCast(lua), index)),
16611661
else => return @intCast(c.lua_rawlen(@ptrCast(lua), index)),
16621662
}
16631663
}

0 commit comments

Comments
 (0)