diff options
Diffstat (limited to 'lbuiltin.c')
-rw-r--r-- | lbuiltin.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbuiltin.c,v 1.111 2000/05/26 19:17:57 roberto Exp roberto $ | 2 | ** $Id: lbuiltin.c,v 1.112 2000/06/02 19:08:56 roberto Exp roberto $ |
3 | ** Built-in functions | 3 | ** Built-in functions |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -68,12 +68,7 @@ static Number getsize (const Hash *h) { | |||
68 | 68 | ||
69 | 69 | ||
70 | static Number getnarg (lua_State *L, const Hash *a) { | 70 | static Number getnarg (lua_State *L, const Hash *a) { |
71 | TObject index; | 71 | const TObject *value = luaH_getstr(a, luaS_new(L, "n")); /* value = a.n */ |
72 | const TObject *value; | ||
73 | /* value = table.n */ | ||
74 | ttype(&index) = TAG_STRING; | ||
75 | tsvalue(&index) = luaS_new(L, "n"); | ||
76 | value = luaH_get(L, a, &index); | ||
77 | return (ttype(value) == TAG_NUMBER) ? nvalue(value) : getsize(a); | 72 | return (ttype(value) == TAG_NUMBER) ? nvalue(value) : getsize(a); |
78 | } | 73 | } |
79 | 74 | ||