mirror of
https://github.com/lua/lua
synced 2025-01-22 09:02:05 +03:00
error message
This commit is contained in:
parent
906434011f
commit
5362426ffa
6
ltable.c
6
ltable.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltable.c,v 1.47 2000/06/08 17:48:31 roberto Exp roberto $
|
** $Id: ltable.c,v 1.48 2000/06/12 13:52:05 roberto Exp roberto $
|
||||||
** Lua tables (hash)
|
** Lua tables (hash)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -73,7 +73,7 @@ static const TObject *luaH_getany (lua_State *L, const Hash *t,
|
|||||||
const TObject *key) {
|
const TObject *key) {
|
||||||
Node *n = luaH_mainposition(t, key);
|
Node *n = luaH_mainposition(t, key);
|
||||||
if (!n)
|
if (!n)
|
||||||
lua_error(L, "unexpected type to index table");
|
lua_error(L, "table index is nil");
|
||||||
else do {
|
else do {
|
||||||
if (luaO_equalObj(key, &n->key))
|
if (luaO_equalObj(key, &n->key))
|
||||||
return &n->val;
|
return &n->val;
|
||||||
@ -226,7 +226,7 @@ TObject *luaH_set (lua_State *L, Hash *t, const TObject *key) {
|
|||||||
Node *mp = luaH_mainposition(t, key);
|
Node *mp = luaH_mainposition(t, key);
|
||||||
Node *n = mp;
|
Node *n = mp;
|
||||||
if (!mp)
|
if (!mp)
|
||||||
lua_error(L, "unexpected type to index table");
|
lua_error(L, "table index is nil");
|
||||||
do { /* check whether `key' is somewhere in the chain */
|
do { /* check whether `key' is somewhere in the chain */
|
||||||
if (luaO_equalObj(key, &n->key))
|
if (luaO_equalObj(key, &n->key))
|
||||||
return &n->val; /* that's all */
|
return &n->val; /* that's all */
|
||||||
|
Loading…
Reference in New Issue
Block a user