summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dlua.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-21 12:32:59 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-21 12:32:59 +0200
commitd9a9f676d1265f71ab6ebebed582b25e1e7ed8ab (patch)
treedccdca9d3d48b1e874f4fdb72b7c0f82687fc208 /crawl-ref/source/dlua.cc
parentdf9d0d88a17ed81f394e76d336657e5a180c0c36 (diff)
downloadcrawl-ref-d9a9f676d1265f71ab6ebebed582b25e1e7ed8ab.tar.gz
crawl-ref-d9a9f676d1265f71ab6ebebed582b25e1e7ed8ab.zip
Move print_?lua_stack into CLua.
Diffstat (limited to 'crawl-ref/source/dlua.cc')
-rw-r--r--crawl-ref/source/dlua.cc26
1 files changed, 0 insertions, 26 deletions
diff --git a/crawl-ref/source/dlua.cc b/crawl-ref/source/dlua.cc
index cac5941566..d80c64118c 100644
--- a/crawl-ref/source/dlua.cc
+++ b/crawl-ref/source/dlua.cc
@@ -300,29 +300,3 @@ void init_dungeon_lua()
register_itemlist(dlua);
register_monslist(dlua);
}
-
-// Can be called from within a debugger to look at the current Lua
-// call stack. (Borrowed from ToME 3)
-void print_dlua_stack(void)
-{
- struct lua_Debug dbg;
- int i = 0;
- lua_State *L = dlua.state();
-
- fprintf(stderr, EOL);
- while (lua_getstack(L, i++, &dbg) == 1)
- {
- lua_getinfo(L, "lnuS", &dbg);
-
- char* file = strrchr(dbg.short_src, '/');
- if (file == NULL)
- file = dbg.short_src;
- else
- file++;
-
- fprintf(stderr, "%s, function %s, line %d" EOL, file,
- dbg.name, dbg.currentline);
- }
-
- fprintf(stderr, EOL);
-}