MCPcopy Create free account
hub / github.com/Tencent/xLua / xlua_pushstruct

Function xlua_pushstruct

WebGLPlugins/xlua.c:830–837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

828} CSharpStruct;
829
830LUA_API void *xlua_pushstruct(lua_State *L, unsigned int size, int meta_ref) {
831 CSharpStruct *css = (CSharpStruct *)lua_newuserdata(L, size + sizeof(int) + sizeof(unsigned int));
832 css->fake_id = -1;
833 css->len = size;
834 lua_rawgeti(L, LUA_REGISTRYINDEX, meta_ref);
835 lua_setmetatable(L, -2);
836 return css;
837}
838
839LUA_API void xlua_pushcstable(lua_State *L, unsigned int size, int meta_ref) {
840 lua_createtable(L, 0, size);

Callers

nothing calls this directly

Calls 3

lua_newuserdataFunction · 0.85
lua_rawgetiFunction · 0.85
lua_setmetatableFunction · 0.85

Tested by

no test coverage detected