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

Function luaS_newudata

third-party/lua-5.2.4/src/lstring.c:175–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

lua_newuserdataFunction · 0.70

Calls 2

luaM_toobigFunction · 0.70
luaC_newobjFunction · 0.70

Tested by

no test coverage detected