commit ef8c0d7d904a40840d34e758007ae07ca87922d0
parent 178246062ccda6f8bd2cc2dc847ceb3b8800850c
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 23 Mar 2004 10:09:54 -0300
better message for errors with upvalues
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ldebug.c b/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);