macro 'luai_apicheck'/'api_check' back with a 'lua_State' parameter

(some people use it)
This commit is contained in:
Roberto Ierusalimschy
2015-03-06 16:49:50 -03:00
parent bb4baa73ea
commit a30c66f0fc
6 changed files with 60 additions and 54 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ldebug.c,v 2.110 2015/01/02 12:52:22 roberto Exp roberto $
** $Id: ldebug.c,v 2.111 2015/02/13 16:01:17 roberto Exp roberto $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -295,7 +295,7 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) {
if (*what == '>') {
ci = NULL;
func = L->top - 1;
api_check(ttisfunction(func), "function expected");
api_check(L, ttisfunction(func), "function expected");
what++; /* skip the '>' */
L->top--; /* pop function */
}