no more lua_[gs]etstr

This commit is contained in:
Roberto Ierusalimschy
2002-02-07 15:25:36 -02:00
parent 53aaee6ee6
commit 86a4de256e
5 changed files with 48 additions and 29 deletions

View File

@@ -240,8 +240,9 @@ LUALIB_API int luaL_ref (lua_State *L, int t) {
}
else { /* no free elements */
ref = lua_getn(L, t) + 1; /* use next `n' */
lua_pushliteral(L, "n");
lua_pushnumber(L, ref);
lua_setstr(L, t, "n"); /* n = n+1 */
lua_rawset(L, t); /* n = n+1 */
}
lua_rawseti(L, t, ref);
return ref;