1
0
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:
Roberto Ierusalimschy 1999-01-15 09:36:28 -02:00
parent fb663f768d
commit dea400bc1d

View File

@ -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);
}
}