MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / tref

Function tref

Dependencies/lua/src/ltests.c:1054–1062  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1052
1053
1054static int tref (lua_State *L) {
1055 int level = lua_gettop(L);
1056 luaL_checkany(L, 1);
1057 lua_pushvalue(L, 1);
1058 lua_pushinteger(L, luaL_ref(L, LUA_REGISTRYINDEX));
1059 cast_void(level); /* to avoid warnings */
1060 lua_assert(lua_gettop(L) == level+1); /* +1 for result */
1061 return 1;
1062}
1063
1064static int getref (lua_State *L) {
1065 int level = lua_gettop(L);

Callers

nothing calls this directly

Calls 5

lua_gettopFunction · 0.85
luaL_checkanyFunction · 0.85
lua_pushvalueFunction · 0.85
lua_pushintegerFunction · 0.85
luaL_refFunction · 0.85

Tested by

no test coverage detected