aboutsummaryrefslogtreecommitdiff
path: root/lbuiltin.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-06-05 17:15:33 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-06-05 17:15:33 -0300
commit292c9530183a8e9939cff9a7d30fc50e85031698 (patch)
tree20dc1c90af03ef60396d6a8df737369fb8238f21 /lbuiltin.c
parentc542aac0b935a65203244c130cdfa700113f0bc8 (diff)
downloadlua-292c9530183a8e9939cff9a7d30fc50e85031698.tar.gz
lua-292c9530183a8e9939cff9a7d30fc50e85031698.tar.bz2
lua-292c9530183a8e9939cff9a7d30fc50e85031698.zip
new auxiliar function `luaH_setstr'
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