diff options
Diffstat (limited to 'crawl-ref/source/dlua.cc')
-rw-r--r-- | crawl-ref/source/dlua.cc | 26 |
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); -} |