MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_Unsigned

Function lua_Unsigned

third-party/lua-5.5.0/src/lapi.c:437–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435
436
437LUA_API lua_Unsigned lua_rawlen (lua_State *L, int idx) {
438 const TValue *o = index2value(L, idx);
439 switch (ttypetag(o)) {
440 case LUA_VSHRSTR: return cast(lua_Unsigned, tsvalue(o)->shrlen);
441 case LUA_VLNGSTR: return cast(lua_Unsigned, tsvalue(o)->u.lnglen);
442 case LUA_VUSERDATA: return cast(lua_Unsigned, uvalue(o)->len);
443 case LUA_VTABLE: {
444 lua_Unsigned res;
445 lua_lock(L);
446 res = luaH_getn(L, hvalue(o));
447 lua_unlock(L);
448 return res;
449 }
450 default: return 0;
451 }
452}
453
454
455LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) {

Callers

nothing calls this directly

Calls 2

index2valueFunction · 0.70
luaH_getnFunction · 0.70

Tested by

no test coverage detected