aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-09-27 09:51:39 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-09-27 09:51:39 -0300
commit444d6a106bdad894808288fc2594ff0b0eac6cba (patch)
treee073ae92a9bb2240d035e6aaec09a377e9395778 /lapi.c
parent13635f7de7c51b26c447ce444a2c045cba83fe7c (diff)
downloadlua-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index e664ea43..39e052b4 100644
--- a/lapi.c
+++ b/lapi.c
@@ -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) {
131int lua_tag (lua_State *L, int index) { 131int 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
137int lua_equal (lua_State *L, int index1, int index2) { 137int lua_equal (lua_State *L, int index1, int index2) {