MCPcopy Create free account
hub / github.com/defold/defold / lua_newuserdata

Function lua_newuserdata

engine/lua/src/lua/lapi.c:1025–1034  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1023
1024
1025LUA_API void *lua_newuserdata (lua_State *L, size_t size) {
1026 Udata *u;
1027 lua_lock(L);
1028 luaC_checkGC(L);
1029 u = luaS_newudata(L, size, getcurrenv(L));
1030 setuvalue(L, L->top, u);
1031 api_incr_top(L);
1032 lua_unlock(L);
1033 return u + 1;
1034}
1035
1036
1037

Callers 15

NewScriptFunction · 0.85
NewScriptInstanceFunction · 0.85
PushURLFunction · 0.85
CreateCallbackFunction · 0.85
CreateLuaHashUserdataFunction · 0.85
PushVectorFunction · 0.85
PushVector3Function · 0.85
PushVector4Function · 0.85
PushQuatFunction · 0.85
PushMatrix4Function · 0.85
NewUserTypeFunction · 0.85
TEST_FFunction · 0.85

Calls 2

luaS_newudataFunction · 0.85
getcurrenvFunction · 0.85

Tested by 9

NewUserTypeFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
CreateAndPushInstanceFunction · 0.68
SetUpMethod · 0.68
CreateScriptInstanceFunction · 0.68
SetUpMethod · 0.68