aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-02-27 12:59:22 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-02-27 12:59:22 -0300
commit6eb53b752617fae9e1329bfe2cfecdcbb593c398 (patch)
treec392ef632bbcfbf7b3716f5c6c17b06617bca8da /ldebug.c
parent9b7987a9d1471ba94764286b28e0998f73deb46a (diff)
downloadlua-6eb53b752617fae9e1329bfe2cfecdcbb593c398.tar.gz
lua-6eb53b752617fae9e1329bfe2cfecdcbb593c398.tar.bz2
lua-6eb53b752617fae9e1329bfe2cfecdcbb593c398.zip
Details
Several details in code (e.g., moving a variable to the most inner scope that encloses its uses), comments, parameter names, extra tests.
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c6
1 files changed, 3 insertions, 3 deletions
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) {
101} 101}
102 102
103 103
104static int currentline (CallInfo *ci) { 104static int getcurrentline (CallInfo *ci) {
105 return luaG_getfuncline(ci_func(ci)->p, currentpc(ci)); 105 return luaG_getfuncline(ci_func(ci)->p, currentpc(ci));
106} 106}
107 107
@@ -339,7 +339,7 @@ static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,
339 break; 339 break;
340 } 340 }
341 case 'l': { 341 case 'l': {
342 ar->currentline = (ci && isLua(ci)) ? currentline(ci) : -1; 342 ar->currentline = (ci && isLua(ci)) ? getcurrentline(ci) : -1;
343 break; 343 break;
344 } 344 }
345 case 'u': { 345 case 'u': {
@@ -775,7 +775,7 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
775 msg = luaO_pushvfstring(L, fmt, argp); /* format message */ 775 msg = luaO_pushvfstring(L, fmt, argp); /* format message */
776 va_end(argp); 776 va_end(argp);
777 if (isLua(ci)) /* if Lua function, add source:line information */ 777 if (isLua(ci)) /* if Lua function, add source:line information */
778 luaG_addinfo(L, msg, ci_func(ci)->p->source, currentline(ci)); 778 luaG_addinfo(L, msg, ci_func(ci)->p->source, getcurrentline(ci));
779 luaG_errormsg(L); 779 luaG_errormsg(L);
780} 780}
781 781