MCPcopy Create free account
hub / github.com/Segs/Segs / lua_Integer luaL_len

Function lua_Integer luaL_len

3rd_party/lua_sol2/include/sol.hpp:2572–2582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2570}
2571
2572COMPAT53_API lua_Integer luaL_len(lua_State *L, int i) {
2573 lua_Integer res = 0;
2574 int isnum = 0;
2575 luaL_checkstack(L, 1, "not enough stack slots");
2576 lua_len(L, i);
2577 res = lua_tointegerx(L, -1, &isnum);
2578 lua_pop(L, 1);
2579 if (!isnum)
2580 luaL_error(L, "object length is not an integer");
2581 return res;
2582}
2583
2584COMPAT53_API void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup) {
2585 luaL_checkstack(L, nup + 1, "too many upvalues");

Callers

nothing calls this directly

Calls 2

luaL_checkstackFunction · 0.85
lua_lenFunction · 0.85

Tested by

no test coverage detected