MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / newbox

Function newbox

third-party/lua-5.5.0/src/lauxlib.c:516–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514
515
516static void newbox (lua_State *L) {
517 UBox *box = (UBox *)lua_newuserdatauv(L, sizeof(UBox), 0);
518 box->box = NULL;
519 box->bsize = 0;
520 if (luaL_newmetatable(L, "_UBOX*")) /* creating metatable? */
521 luaL_setfuncs(L, boxmt, 0); /* set its metamethods */
522 lua_setmetatable(L, -2);
523}
524
525
526/*

Callers 1

prepbuffsizeFunction · 0.70

Calls 4

lua_newuserdatauvFunction · 0.70
luaL_newmetatableFunction · 0.70
luaL_setfuncsFunction · 0.70
lua_setmetatableFunction · 0.70

Tested by

no test coverage detected