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

Function lua_newuserdata

libraries/AP_Scripting/lua/src/lapi.c:1184–1195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1182
1183
1184LUA_API void *lua_newuserdata (lua_State *L, size_t size) {
1185 Udata *u;
1186 lua_lock(L);
1187 u = luaS_newudata(L, size);
1188 setuvalue(L, L->top, u);
1189 api_incr_top(L);
1190 luaC_checkGC(L);
1191 lua_unlock(L);
1192 void *udata = getudatamem(u);
1193 memset(udata, 0, size);
1194 return udata;
1195}
1196
1197
1198

Callers 4

lua_new_ParameterFunction · 0.85
gmatchFunction · 0.85
newboxFunction · 0.85
newprefileFunction · 0.85

Calls 2

luaS_newudataFunction · 0.85
memsetFunction · 0.85

Tested by

no test coverage detected