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

Function xlua_pushcsobj

WebGLPlugins/xlua.c:358–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356
357
358LUA_API void xlua_pushcsobj(lua_State *L, int key, int meta_ref, int need_cache, int cache_ref) {
359 int* pointer = (int*)lua_newuserdata(L, sizeof(int));
360 *pointer = key;
361
362 if (need_cache) cacheud(L, key, cache_ref);
363
364 lua_rawgeti(L, LUA_REGISTRYINDEX, meta_ref);
365
366 lua_setmetatable(L, -2);
367}
368
369void print_top(lua_State *L) {
370 lua_getglobal(L, "print");

Callers

nothing calls this directly

Calls 4

lua_newuserdataFunction · 0.85
cacheudFunction · 0.85
lua_rawgetiFunction · 0.85
lua_setmetatableFunction · 0.85

Tested by

no test coverage detected