aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-03 11:27:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-03 11:27:44 -0300
commitd68209e822c21d3678cc53f1e02ba1c9dd26e23e (patch)
tree76feb02bb882d8b40fd3b969017b811e39389dff /lapi.c
parent1088cde03c5551bab90e211e979b11278d666cd5 (diff)
downloadlua-d68209e822c21d3678cc53f1e02ba1c9dd26e23e.tar.gz
lua-d68209e822c21d3678cc53f1e02ba1c9dd26e23e.tar.bz2
lua-d68209e822c21d3678cc53f1e02ba1c9dd26e23e.zip
details.
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lapi.c b/lapi.c
index 48488d3a..7715c5a2 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.102 2000/10/02 14:47:43 roberto Exp roberto $ 2** $Id: lapi.c,v 1.103 2000/10/02 20:10:55 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*/
@@ -141,10 +141,14 @@ int lua_isstring (lua_State *L, int index) {
141 return (t == LUA_TSTRING || t == LUA_TNUMBER); 141 return (t == LUA_TSTRING || t == LUA_TNUMBER);
142} 142}
143 143
144
145static int auxtag (const TObject *o) {
146return ((ttype(o) == TAG_USERDATA) ? tsvalue(o)->u.d.tag :
147 (ttype(o) == TAG_TABLE) ? hvalue(o)->htag : (int)ttype(o));
148}
149
144int lua_tag (lua_State *L, int index) { 150int lua_tag (lua_State *L, int index) {
145 btest(L, index, 151 btest(L, index, auxtag(o), LUA_NOTAG);
146 ((ttype(o) == TAG_USERDATA) ? tsvalue(o)->u.d.tag :
147 luaT_effectivetag(L, o)), LUA_NOTAG);
148} 152}
149 153
150int lua_equal (lua_State *L, int index1, int index2) { 154int lua_equal (lua_State *L, int index1, int index2) {