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 | |
| 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
| -rw-r--r-- | bugs | 8 | ||||
| -rw-r--r-- | lapi.c | 4 |
2 files changed, 9 insertions, 3 deletions
| @@ -215,5 +215,11 @@ Mon Sep 25 11:47:48 EST 2000 | |||
| 215 | 215 | ||
| 216 | ** lgc.c | 216 | ** lgc.c |
| 217 | Mon Sep 25 11:50:48 EST 2000 | 217 | Mon Sep 25 11:50:48 EST 2000 |
| 218 | >> GC may crash when checking C closures | 218 | >> GC may crash when checking locked C closures |
| 219 | (by Philip Yi; since 4.0b) | 219 | (by Philip Yi; since 4.0b) |
| 220 | |||
| 221 | ** lapi.c | ||
| 222 | Wed Sep 27 09:50:19 EST 2000 | ||
| 223 | >> lua_tag should return LUA_NOTAG for non-valid indices | ||
| 224 | (by Paul Hankin; since 4.0b) | ||
| 225 | |||
| @@ -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) { |
