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

Function newbox

third-party/lua-5.4.6/src/lauxlib.c:504–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502
503
504static void newbox (lua_State *L) {
505 UBox *box = (UBox *)lua_newuserdatauv(L, sizeof(UBox), 0);
506 box->box = NULL;
507 box->bsize = 0;
508 if (luaL_newmetatable(L, "_UBOX*")) /* creating metatable? */
509 luaL_setfuncs(L, boxmt, 0); /* set its metamethods */
510 lua_setmetatable(L, -2);
511}
512
513
514/*

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