diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-10 15:41:50 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-10 15:41:50 -0200 |
| commit | 08496eea8b277d37c4de9cf75a011715ad6a4100 (patch) | |
| tree | 9c3eef538b85f79ece0a0993e4d99930be6f6039 /lapi.c | |
| parent | 4ff55457095728b95cc5dcdbab0bca7255bd5387 (diff) | |
| download | lua-08496eea8b277d37c4de9cf75a011715ad6a4100.tar.gz lua-08496eea8b277d37c4de9cf75a011715ad6a4100.tar.bz2 lua-08496eea8b277d37c4de9cf75a011715ad6a4100.zip | |
small changes in lstring
Diffstat (limited to 'lapi.c')
| -rw-r--r-- | lapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 1.113 2000/12/26 18:46:09 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.114 2000/12/28 12:55:41 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -456,7 +456,7 @@ LUA_API int lua_next (lua_State *L, int index) { | |||
| 456 | 456 | ||
| 457 | LUA_API int lua_getn (lua_State *L, int index) { | 457 | LUA_API int lua_getn (lua_State *L, int index) { |
| 458 | Hash *h = hvalue(luaA_index(L, index)); | 458 | Hash *h = hvalue(luaA_index(L, index)); |
| 459 | const TObject *value = luaH_getstr(h, luaS_new(L, "n")); /* value = h.n */ | 459 | const TObject *value = luaH_getstr(h, luaS_newliteral(L, "n")); /* = h.n */ |
| 460 | if (ttype(value) == LUA_TNUMBER) | 460 | if (ttype(value) == LUA_TNUMBER) |
| 461 | return (int)nvalue(value); | 461 | return (int)nvalue(value); |
| 462 | else { | 462 | else { |
