MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaS_newudata

Function luaS_newudata

freebsd/contrib/openzfs/module/lua/lstring.c:176–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176Udata *luaS_newudata (lua_State *L, size_t s, Table *e) {
177 Udata *u;
178 if (s > MAX_SIZET - sizeof(Udata))
179 luaM_toobig(L);
180 u = &luaC_newobj(L, LUA_TUSERDATA, sizeof(Udata) + s, NULL, 0)->u;
181 u->uv.len = s;
182 u->uv.metatable = NULL;
183 u->uv.env = e;
184 return u;
185}
186/* END CSTYLED */

Callers 1

lua_newuserdataFunction · 0.70

Calls 2

luaC_newobjFunction · 0.85
luaM_toobigFunction · 0.70

Tested by

no test coverage detected