mirror of
https://github.com/lua/lua.git
synced 2025-01-28 06:03:00 +08:00
"getstack" returns func, too.
This commit is contained in:
parent
fb663f768d
commit
dea400bc1d
6
ldblib.c
6
ldblib.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: ldblib.c,v 1.1 1999/01/08 16:47:44 roberto Exp roberto $
|
||||
** $Id: ldblib.c,v 1.2 1999/01/11 18:57:35 roberto Exp roberto $
|
||||
** Interface from Lua to its debug API
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -68,6 +68,10 @@ static void getstack (void) {
|
||||
if (currline > 0)
|
||||
settabsi(result, "current", currline);
|
||||
lua_pushobject(result);
|
||||
lua_pushstring("func");
|
||||
lua_pushobject(func);
|
||||
lua_settable(); /* result.func = func */
|
||||
lua_pushobject(result);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user