diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-12-10 20:09:51 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-12-10 20:09:51 -0200 |
commit | 9cd36059ad6f3f6750b8cff54c305ae347c6caca (patch) | |
tree | 6b71bb5dab3c7f1e8fec12bc03830b58cdc59fc0 /lauxlib.c | |
parent | 592a309177edc52847b1196969ad6d49ba21f4fb (diff) | |
download | lua-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.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |