Lines Matching refs:ref
482 int ref; in luaL_ref() local
489 ref = (int)lua_tointeger(L, -1); /* ref = t[FREELIST_REF] */ in luaL_ref()
491 if (ref != 0) { /* any free element? */ in luaL_ref()
492 lua_rawgeti(L, t, ref); /* remove it from list */ in luaL_ref()
496 ref = (int)lua_objlen(L, t); in luaL_ref()
497 ref++; /* create new reference */ in luaL_ref()
499 lua_rawseti(L, t, ref); in luaL_ref()
500 return ref; in luaL_ref()
504 LUALIB_API void luaL_unref (lua_State *L, int t, int ref) { in luaL_unref() argument
505 if (ref >= 0) { in luaL_unref()
508 lua_rawseti(L, t, ref); /* t[ref] = t[FREELIST_REF] */ in luaL_unref()
509 lua_pushinteger(L, ref); in luaL_unref()