MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / lua_newuserdatauv

Function lua_newuserdatauv

extlibs/lua/src/lapi.c:1298–1308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1296
1297
1298LUA_API void *lua_newuserdatauv (lua_State *L, size_t size, int nuvalue) {
1299 Udata *u;
1300 lua_lock(L);
1301 api_check(L, 0 <= nuvalue && nuvalue < USHRT_MAX, "invalid value");
1302 u = luaS_newudata(L, size, nuvalue);
1303 setuvalue(L, s2v(L->top), u);
1304 api_incr_top(L);
1305 luaC_checkGC(L);
1306 lua_unlock(L);
1307 return getudatamem(u);
1308}
1309
1310
1311

Callers 5

setrandfuncFunction · 0.85
gmatchFunction · 0.85
newboxFunction · 0.85
luaL_newstateFunction · 0.85
newprefileFunction · 0.85

Calls 1

luaS_newudataFunction · 0.85

Tested by

no test coverage detected