diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-28 14:03:56 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-28 14:03:56 -0300 |
commit | 5362426ffa93031e194632c97c39194fd21cedf3 (patch) | |
tree | b7d04a81158aea3a9673ce1d10fd74d221dff073 | |
parent | 906434011f09a5afe60fbb644db6995a5ca21f0d (diff) | |
download | lua-5362426ffa93031e194632c97c39194fd21cedf3.tar.gz lua-5362426ffa93031e194632c97c39194fd21cedf3.tar.bz2 lua-5362426ffa93031e194632c97c39194fd21cedf3.zip |
error message
-rw-r--r-- | ltable.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 1.47 2000/06/08 17:48:31 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 1.48 2000/06/12 13:52:05 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -73,7 +73,7 @@ static const TObject *luaH_getany (lua_State *L, const Hash *t, | |||
73 | const TObject *key) { | 73 | const TObject *key) { |
74 | Node *n = luaH_mainposition(t, key); | 74 | Node *n = luaH_mainposition(t, key); |
75 | if (!n) | 75 | if (!n) |
76 | lua_error(L, "unexpected type to index table"); | 76 | lua_error(L, "table index is nil"); |
77 | else do { | 77 | else do { |
78 | if (luaO_equalObj(key, &n->key)) | 78 | if (luaO_equalObj(key, &n->key)) |
79 | return &n->val; | 79 | return &n->val; |
@@ -226,7 +226,7 @@ TObject *luaH_set (lua_State *L, Hash *t, const TObject *key) { | |||
226 | Node *mp = luaH_mainposition(t, key); | 226 | Node *mp = luaH_mainposition(t, key); |
227 | Node *n = mp; | 227 | Node *n = mp; |
228 | if (!mp) | 228 | if (!mp) |
229 | lua_error(L, "unexpected type to index table"); | 229 | lua_error(L, "table index is nil"); |
230 | do { /* check whether `key' is somewhere in the chain */ | 230 | do { /* check whether `key' is somewhere in the chain */ |
231 | if (luaO_equalObj(key, &n->key)) | 231 | if (luaO_equalObj(key, &n->key)) |
232 | return &n->val; /* that's all */ | 232 | return &n->val; /* that's all */ |