From 6eb53b752617fae9e1329bfe2cfecdcbb593c398 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 27 Feb 2020 12:59:22 -0300 Subject: Details Several details in code (e.g., moving a variable to the most inner scope that encloses its uses), comments, parameter names, extra tests. --- ldebug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index a1913c59..eaac16f7 100644 --- a/ldebug.c +++ b/ldebug.c @@ -101,7 +101,7 @@ int luaG_getfuncline (const Proto *f, int pc) { } -static int currentline (CallInfo *ci) { +static int getcurrentline (CallInfo *ci) { return luaG_getfuncline(ci_func(ci)->p, currentpc(ci)); } @@ -339,7 +339,7 @@ static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, break; } case 'l': { - ar->currentline = (ci && isLua(ci)) ? currentline(ci) : -1; + ar->currentline = (ci && isLua(ci)) ? getcurrentline(ci) : -1; break; } case 'u': { @@ -775,7 +775,7 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) { msg = luaO_pushvfstring(L, fmt, argp); /* format message */ va_end(argp); if (isLua(ci)) /* if Lua function, add source:line information */ - luaG_addinfo(L, msg, ci_func(ci)->p->source, currentline(ci)); + luaG_addinfo(L, msg, ci_func(ci)->p->source, getcurrentline(ci)); luaG_errormsg(L); } -- cgit v1.2.3-55-g6feb