diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-03 11:27:44 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-03 11:27:44 -0300 |
commit | d68209e822c21d3678cc53f1e02ba1c9dd26e23e (patch) | |
tree | 76feb02bb882d8b40fd3b969017b811e39389dff /lapi.c | |
parent | 1088cde03c5551bab90e211e979b11278d666cd5 (diff) | |
download | lua-d68209e822c21d3678cc53f1e02ba1c9dd26e23e.tar.gz lua-d68209e822c21d3678cc53f1e02ba1c9dd26e23e.tar.bz2 lua-d68209e822c21d3678cc53f1e02ba1c9dd26e23e.zip |
details.
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 | |||
145 | static int auxtag (const TObject *o) { | ||
146 | return ((ttype(o) == TAG_USERDATA) ? tsvalue(o)->u.d.tag : | ||
147 | (ttype(o) == TAG_TABLE) ? hvalue(o)->htag : (int)ttype(o)); | ||
148 | } | ||
149 | |||
144 | int lua_tag (lua_State *L, int index) { | 150 | int 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 | ||
150 | int lua_equal (lua_State *L, int index1, int index2) { | 154 | int lua_equal (lua_State *L, int index1, int index2) { |