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

Function lua_newuserdatauv

xrepo/packages/l/lua/port/lua/src/lapi.c:1346–1356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1344
1345
1346LUA_API void *lua_newuserdatauv (lua_State *L, size_t size, int nuvalue) {
1347 Udata *u;
1348 lua_lock(L);
1349 api_check(L, 0 <= nuvalue && nuvalue < USHRT_MAX, "invalid value");
1350 u = luaS_newudata(L, size, nuvalue);
1351 setuvalue(L, s2v(L->top), u);
1352 api_incr_top(L);
1353 luaC_checkGC(L);
1354 lua_unlock(L);
1355 return getudatamem(u);
1356}
1357
1358
1359

Callers 4

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

Calls 1

luaS_newudataFunction · 0.85

Tested by

no test coverage detected