MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / lua_Unsigned

Function lua_Unsigned

3rd/lua-5.4.3/src/lapi.c:420–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418
419
420LUA_API lua_Unsigned lua_rawlen (lua_State *L, int idx) {
421 const TValue *o = index2value(L, idx);
422 switch (ttypetag(o)) {
423 case LUA_VSHRSTR: return tsvalue(o)->shrlen;
424 case LUA_VLNGSTR: return tsvalue(o)->u.lnglen;
425 case LUA_VUSERDATA: return uvalue(o)->len;
426 case LUA_VTABLE: return luaH_getn(hvalue(o));
427 default: return 0;
428 }
429}
430
431
432LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) {

Callers

nothing calls this directly

Calls 2

index2valueFunction · 0.85
luaH_getnFunction · 0.85

Tested by

no test coverage detected