From 86a4de256e88844e34535901d25923aa851d963e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 7 Feb 2002 15:25:36 -0200 Subject: no more lua_[gs]etstr --- lauxlib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lauxlib.c') diff --git a/lauxlib.c b/lauxlib.c index 831d3e34..09d72f18 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -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; -- cgit v1.2.1