aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-06-28 14:03:56 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-06-28 14:03:56 -0300
commit5362426ffa93031e194632c97c39194fd21cedf3 (patch)
treeb7d04a81158aea3a9673ce1d10fd74d221dff073
parent906434011f09a5afe60fbb644db6995a5ca21f0d (diff)
downloadlua-5362426ffa93031e194632c97c39194fd21cedf3.tar.gz
lua-5362426ffa93031e194632c97c39194fd21cedf3.tar.bz2
lua-5362426ffa93031e194632c97c39194fd21cedf3.zip
error message
-rw-r--r--ltable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltable.c b/ltable.c
index 535326e3..4b4f37ac 100644
--- a/ltable.c
+++ b/ltable.c
@@ -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 */