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

Function getsizes

other_src/lua/src/lauxlib.cpp:312–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310
311
312static void getsizes (lua_State *L) {
313 lua_getfield(L, LUA_REGISTRYINDEX, "LUA_SIZES");
314 if (lua_isnil(L, -1)) { /* no `size' table? */
315 lua_pop(L, 1); /* remove nil */
316 lua_newtable(L); /* create it */
317 lua_pushvalue(L, -1); /* `size' will be its own metatable */
318 lua_setmetatable(L, -2);
319 lua_pushliteral(L, "kv");
320 lua_setfield(L, -2, "__mode"); /* metatable(N).__mode = "kv" */
321 lua_pushvalue(L, -1);
322 lua_setfield(L, LUA_REGISTRYINDEX, "LUA_SIZES"); /* store in register */
323 }
324}
325
326
327LUALIB_API void luaL_setn (lua_State *L, int t, int n) {

Callers 2

luaL_setnFunction · 0.70
luaL_getnFunction · 0.70

Calls 4

lua_getfieldFunction · 0.70
lua_pushvalueFunction · 0.70
lua_setmetatableFunction · 0.70
lua_setfieldFunction · 0.70

Tested by

no test coverage detected