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

Function lua_newuserdatauv

third-party/lua-5.5.0/src/lapi.c:1353–1363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1351
1352
1353LUA_API void *lua_newuserdatauv (lua_State *L, size_t size, int nuvalue) {
1354 Udata *u;
1355 lua_lock(L);
1356 api_check(L, 0 <= nuvalue && nuvalue < SHRT_MAX, "invalid value");
1357 u = luaS_newudata(L, size, cast(unsigned short, nuvalue));
1358 setuvalue(L, s2v(L->top.p), u);
1359 api_incr_top(L);
1360 luaC_checkGC(L);
1361 lua_unlock(L);
1362 return getudatamem(u);
1363}
1364
1365
1366

Callers 4

setrandfuncFunction · 0.70
gmatchFunction · 0.70
newboxFunction · 0.70
newprefileFunction · 0.70

Calls 1

luaS_newudataFunction · 0.70

Tested by

no test coverage detected