MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / luaS_newudata

Function luaS_newudata

libraries/AP_Scripting/lua/src/lstring.c:241–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239
240
241Udata *luaS_newudata (lua_State *L, size_t s) {
242 Udata *u;
243 GCObject *o;
244 if (s > MAX_SIZE - sizeof(Udata))
245 luaM_toobig(L);
246 o = luaC_newobj(L, LUA_TUSERDATA, sizeludata(s));
247 u = gco2u(o);
248 u->len = s;
249 u->metatable = NULL;
250 setuservalue(L, u, luaO_nilobject);
251 return u;
252}
253

Callers 1

lua_newuserdataFunction · 0.85

Calls 2

luaM_toobigFunction · 0.85
luaC_newobjFunction · 0.85

Tested by

no test coverage detected