| 356 | |
| 357 | |
| 358 | LUA_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 | |
| 369 | void print_top(lua_State *L) { |
| 370 | lua_getglobal(L, "print"); |
nothing calls this directly
no test coverage detected