From c2951478741efaddd34f468fe33a40a786371a3a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 5 Mar 2010 11:01:29 -0300 Subject: when finding a 'name' for a function, handle the case when the function is a for iterator --- ldebug.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 2c62383e..2e6eb698 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.63 2010/01/13 16:18:25 roberto Exp roberto $ +** $Id: ldebug.c,v 2.64 2010/02/26 20:40:29 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -373,8 +373,11 @@ static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) { switch (GET_OPCODE(i)) { case OP_CALL: case OP_TAILCALL: - case OP_TFORLOOP: return getobjname(L, ci, GETARG_A(i), name); + case OP_TFORCALL: { + *name = "for iterator"; + return "for iterator"; + } case OP_GETGLOBAL: case OP_SELF: case OP_GETTABUP: -- cgit v1.2.3-55-g6feb