summaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-07-12 13:16:02 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-07-12 13:16:02 -0300
commit1d8edd347d728ba6b0160359f3c0391e7b1a8a44 (patch)
treebf35de69414c263facfc73f926115d9e9370fc2d /lapi.c
parent41d9ea948c18db38473e353ac7a84bc501f3ce74 (diff)
downloadlua-github-1d8edd347d728ba6b0160359f3c0391e7b1a8a44.tar.gz
small changes to use new auxiliar functions
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lapi.c b/lapi.c
index f0c0a7d1..c74cfba7 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
/*
-** $Id: lapi.c,v 1.24 1998/03/09 21:49:52 roberto Exp roberto $
+** $Id: lapi.c,v 1.25 1998/06/05 22:17:44 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -173,12 +173,8 @@ lua_Object lua_rawgettable (void)
if (ttype(L->stack.top-2) != LUA_T_ARRAY)
lua_error("indexed expression not a table in rawgettable");
else {
- TObject *h = luaH_get(avalue(L->stack.top-2), L->stack.top-1);
+ *(L->stack.top-2) = *luaH_get(avalue(L->stack.top-2), L->stack.top-1);
--L->stack.top;
- if (h != NULL)
- *(L->stack.top-1) = *h;
- else
- ttype(L->stack.top-1) = LUA_T_NIL;
}
return put_luaObjectonTop();
}
@@ -426,7 +422,7 @@ void lua_settag (int tag)
break;
default:
luaL_verror("cannot change the tag of a %.20s",
- luaO_typenames[-ttype((L->stack.top-1))]);
+ luaO_typename(L->stack.top-1));
}
L->stack.top--;
}