MCPcopy Create free account
hub / github.com/DFHack/dfhack / lua_rawlen

Function lua_rawlen

depends/lua/src/lapi.c:392–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390
391
392LUA_API size_t lua_rawlen (lua_State *L, int idx) {
393 StkId o = index2addr(L, idx);
394 switch (ttype(o)) {
395 case LUA_TSHRSTR: return tsvalue(o)->shrlen;
396 case LUA_TLNGSTR: return tsvalue(o)->u.lnglen;
397 case LUA_TUSERDATA: return uvalue(o)->len;
398 case LUA_TTABLE: return size_t(luaH_getn(hvalue(o)));
399 default: return 0;
400 }
401}
402
403
404LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) {

Callers 10

meta_struct_nextFunction · 0.85
meta_union_nextFunction · 0.85
IndexFieldsFunction · 0.85
meta_fieldinfo_nextFunction · 0.85
dfhack_random_initFunction · 0.85
screen_doSimulateInputFunction · 0.85
meta_assignFunction · 0.85
luaB_rawlenFunction · 0.85
luaL_refFunction · 0.85
read_lineFunction · 0.85

Calls 2

index2addrFunction · 0.85
luaH_getnFunction · 0.85

Tested by

no test coverage detected