Debug information about extra arguments from __call
'debug.getinfo' can return number of extra arguments added to a call by a chain of __call metavalues. That information is being used to improve error messages about errors in these extra arguments.
This commit is contained in:
10
ldebug.c
10
ldebug.c
@@ -352,7 +352,15 @@ static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,
|
||||
break;
|
||||
}
|
||||
case 't': {
|
||||
ar->istailcall = (ci != NULL && (ci->callstatus & CIST_TAIL));
|
||||
if (ci != NULL) {
|
||||
ar->istailcall = !!(ci->callstatus & CIST_TAIL);
|
||||
ar->extraargs =
|
||||
cast_uchar((ci->callstatus & MAX_CCMT) >> CIST_CCMT);
|
||||
}
|
||||
else {
|
||||
ar->istailcall = 0;
|
||||
ar->extraargs = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'n': {
|
||||
|
||||
Reference in New Issue
Block a user