-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Hello there.
lib/ziglua/src/lib.zig:1345:17: error: root struct of file 'cimport' has no member named 'lua_objlen'
return c.lua_objlen(lua.state, index);Not sure if it's a bug or me being fresh to Lua, but it looks like there was a change in Lua5.2+ and there is no lua_objlen function anymore. Insted there is lua_len, which pushes the result onto the stack.
size_t lua_objlen (lua_State *L, int index);
Returns the "length" of the value at the given acceptable index: for strings, this is the string length; for tables, this is the result of the length operator ('#'); for userdata, this is the size of the block of memory allocated for the userdata; for other values, it is 0.
void lua_len (lua_State *L, int index);
Returns the length of the value at the given index. It is equivalent to the '#' operator in Lua (see §3.4.7) and may trigger a metamethod for the "length" event (see §2.4). The result is pushed on the stack.