Lines Matching refs:ref
661 int ref; in luaL_ref() local
668 ref = 0; /* list is empty */ in luaL_ref()
674 ref = (int)lua_tointeger(L, -1); /* ref = t[freelist] */ in luaL_ref()
677 if (ref != 0) { /* any free element? */ in luaL_ref()
678 lua_rawgeti(L, t, ref); /* remove it from list */ in luaL_ref()
682 ref = (int)lua_rawlen(L, t) + 1; /* get a new reference */ in luaL_ref()
683 lua_rawseti(L, t, ref); in luaL_ref()
684 return ref; in luaL_ref()
688 LUALIB_API void luaL_unref (lua_State *L, int t, int ref) { in luaL_unref() argument
689 if (ref >= 0) { in luaL_unref()
693 lua_rawseti(L, t, ref); /* t[ref] = t[freelist] */ in luaL_unref()
694 lua_pushinteger(L, ref); in luaL_unref()