debug interface uses method' to describe calls like a:foo()'

This commit is contained in:
Roberto Ierusalimschy
2002-04-04 14:21:31 -03:00
parent 49c95648a0
commit 93bcb65a9b
2 changed files with 7 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/* /*
** $Id: ldebug.c,v 1.104 2002/03/22 16:54:31 roberto Exp roberto $ ** $Id: ldebug.c,v 1.105 2002/03/25 17:47:14 roberto Exp roberto $
** Debug Interface ** Debug Interface
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@@ -439,11 +439,13 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int stackpos,
*name = kname(p, GETARG_C(i)); *name = kname(p, GETARG_C(i));
return "global"; return "global";
} }
/* else go through */ *name = kname(p, GETARG_C(i));
return "field";
break;
} }
case OP_SELF: { case OP_SELF: {
*name = kname(p, GETARG_C(i)); *name = kname(p, GETARG_C(i));
return "field"; return "method";
break; break;
} }
default: break; default: break;

View File

@@ -1,5 +1,5 @@
/* /*
** $Id: luadebug.h,v 1.25 2002/03/11 12:45:00 roberto Exp roberto $ ** $Id: luadebug.h,v 1.26 2002/03/14 16:50:06 roberto Exp roberto $
** Debugging API ** Debugging API
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@@ -30,7 +30,7 @@ LUA_API lua_Hook lua_setlinehook (lua_State *L, lua_Hook func);
struct lua_Debug { struct lua_Debug {
const char *event; /* `call', `return', `line' */ const char *event; /* `call', `return', `line' */
const char *name; /* (n) */ const char *name; /* (n) */
const char *namewhat; /* (n) `global', `tag method', `local', `field' */ const char *namewhat; /* (n) `global', `local', `field', `method' */
const char *what; /* (S) `Lua' function, `C' function, Lua `main' */ const char *what; /* (S) `Lua' function, `C' function, Lua `main' */
const char *source; /* (S) */ const char *source; /* (S) */
int currentline; /* (l) */ int currentline; /* (l) */