aboutsummaryrefslogtreecommitdiff
path: root/lbuiltin.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbuiltin.c')
-rw-r--r--lbuiltin.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/lbuiltin.c b/lbuiltin.c
index 2e5833ed..19cdb6d6 100644
--- a/lbuiltin.c
+++ b/lbuiltin.c
@@ -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
70static Number getnarg (lua_State *L, const Hash *a) { 70static 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