Browse Source

"getstack" returns func, too.

Roberto Ierusalimschy 26 years ago
parent
commit
dea400bc1d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      ldblib.c

+ 5 - 1
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);
   }
 }