MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / newbox

Function newbox

lib/lua/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.85

Calls 4

lua_newuserdatauvFunction · 0.85
luaL_newmetatableFunction · 0.85
luaL_setfuncsFunction · 0.85
lua_setmetatableFunction · 0.85

Tested by

no test coverage detected