aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-12-10 20:09:51 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-12-10 20:09:51 -0200
commit9cd36059ad6f3f6750b8cff54c305ae347c6caca (patch)
tree6b71bb5dab3c7f1e8fec12bc03830b58cdc59fc0 /lauxlib.c
parent592a309177edc52847b1196969ad6d49ba21f4fb (diff)
downloadlua-9cd36059ad6f3f6750b8cff54c305ae347c6caca.tar.gz
lua-9cd36059ad6f3f6750b8cff54c305ae347c6caca.tar.bz2
lua-9cd36059ad6f3f6750b8cff54c305ae347c6caca.zip
new API functions lua_getstr/lua_setstr
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c3
1 files changed, 1 insertions, 2 deletions
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) {
228 } 228 }
229 else { /* no free elements */ 229 else { /* no free elements */
230 ref = lua_getn(L, t) + 1; /* use next `n' */ 230 ref = lua_getn(L, t) + 1; /* use next `n' */
231 lua_pushliteral(L, "n");
232 lua_pushnumber(L, ref); 231 lua_pushnumber(L, ref);
233 lua_settable(L, t); /* n = n+1 */ 232 lua_setstr(L, t, "n"); /* n = n+1 */
234 } 233 }
235 lua_rawseti(L, t, ref); 234 lua_rawseti(L, t, ref);
236 return ref; 235 return ref;