MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / getsizes

Function getsizes

Source/Misc/lua/src/lua.c:10499–10511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10497
10498
10499static void getsizes (lua_State *L) {
10500lua_getfield(L, LUA_REGISTRYINDEX, "LUA_SIZES");
10501if (lua_isnil(L, -1)) { /* no `size' table? */
10502lua_pop(L, 1); /* remove nil */
10503lua_newtable(L); /* create it */
10504lua_pushvalue(L, -1); /* `size' will be its own metatable */
10505lua_setmetatable(L, -2);
10506lua_pushliteral(L, "kv");
10507lua_setfield(L, -2, "__mode"); /* metatable(N).__mode = "kv" */
10508lua_pushvalue(L, -1);
10509lua_setfield(L, LUA_REGISTRYINDEX, "LUA_SIZES"); /* store in register */
10510}
10511}
10512
10513
10514LUALIB_API void luaL_setn (lua_State *L, int t, int n) {

Callers 2

luaL_setnFunction · 0.85
luaL_getnFunction · 0.85

Calls 4

lua_getfieldFunction · 0.85
lua_pushvalueFunction · 0.85
lua_setmetatableFunction · 0.85
lua_setfieldFunction · 0.85

Tested by

no test coverage detected