From 9cd36059ad6f3f6750b8cff54c305ae347c6caca Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 10 Dec 2001 20:09:51 -0200 Subject: new API functions lua_getstr/lua_setstr --- lauxlib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lauxlib.c') diff --git a/lauxlib.c b/lauxlib.c index 849daa33..9a4b6fde 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -228,9 +228,8 @@ 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_settable(L, t); /* n = n+1 */ + lua_setstr(L, t, "n"); /* n = n+1 */ } lua_rawseti(L, t, ref); return ref; -- cgit v1.2.3-55-g6feb