MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / luaL_getn

Function luaL_getn

other_src/lua/src/lauxlib.cpp:346–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344
345
346LUALIB_API int luaL_getn (lua_State *L, int t) {
347 int n;
348 t = abs_index(L, t);
349 lua_pushliteral(L, "n"); /* try t.n */
350 lua_rawget(L, t);
351 if ((n = checkint(L, 1)) >= 0) return n;
352 getsizes(L); /* else try sizes[t] */
353 lua_pushvalue(L, t);
354 lua_rawget(L, -2);
355 if ((n = checkint(L, 2)) >= 0) return n;
356 return (int)lua_objlen(L, t);
357}
358
359#endif
360

Callers 2

tconcatFunction · 0.70
luaB_unpackFunction · 0.70

Calls 5

lua_rawgetFunction · 0.70
checkintFunction · 0.70
getsizesFunction · 0.70
lua_pushvalueFunction · 0.70
lua_objlenFunction · 0.70

Tested by

no test coverage detected