diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-27 09:51:39 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-27 09:51:39 -0300 |
commit | 444d6a106bdad894808288fc2594ff0b0eac6cba (patch) | |
tree | e073ae92a9bb2240d035e6aaec09a377e9395778 /lapi.c | |
parent | 13635f7de7c51b26c447ce444a2c045cba83fe7c (diff) | |
download | lua-444d6a106bdad894808288fc2594ff0b0eac6cba.tar.gz lua-444d6a106bdad894808288fc2594ff0b0eac6cba.tar.bz2 lua-444d6a106bdad894808288fc2594ff0b0eac6cba.zip |
lua_tag should return LUA_NOTAG for non-valid indices
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.98 2000/09/14 14:09:31 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.99 2000/09/18 19:39:26 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 | */ |
@@ -131,7 +131,7 @@ int lua_isnumber (lua_State *L, int index) { | |||
131 | int lua_tag (lua_State *L, int index) { | 131 | int lua_tag (lua_State *L, int index) { |
132 | btest(L, index, | 132 | btest(L, index, |
133 | ((ttype(o) == TAG_USERDATA) ? tsvalue(o)->u.d.tag : | 133 | ((ttype(o) == TAG_USERDATA) ? tsvalue(o)->u.d.tag : |
134 | luaT_effectivetag(L, o)), -1); | 134 | luaT_effectivetag(L, o)), LUA_NOTAG); |
135 | } | 135 | } |
136 | 136 | ||
137 | int lua_equal (lua_State *L, int index1, int index2) { | 137 | int lua_equal (lua_State *L, int index1, int index2) { |