mirror of
https://github.com/lua/lua
synced 2024-11-22 12:51:30 +03:00
better message for errors with upvalues
This commit is contained in:
parent
178246062c
commit
ef8c0d7d90
7
ldebug.c
7
ldebug.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: ldebug.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $
|
||||
** $Id: ldebug.c,v 2.2 2004/02/20 16:01:05 roberto Exp roberto $
|
||||
** Debug Interface
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -460,6 +460,11 @@ static const char *getobjname (CallInfo *ci, int stackpos, const char **name) {
|
||||
*name = kname(p, k);
|
||||
return "field";
|
||||
}
|
||||
case OP_GETUPVAL: {
|
||||
int u = GETARG_B(i); /* upvalue index */
|
||||
*name = getstr(p->upvalues[u]);
|
||||
return "upvalue";
|
||||
}
|
||||
case OP_SELF: {
|
||||
int k = GETARG_C(i); /* key index */
|
||||
*name = kname(p, k);
|
||||
|
Loading…
Reference in New Issue
Block a user