Skip to content

Instantly share code, notes, and snippets.

@mkottman
Created August 21, 2010 18:41
Show Gist options
  • Select an option

  • Save mkottman/542683 to your computer and use it in GitHub Desktop.

Select an option

Save mkottman/542683 to your computer and use it in GitHub Desktop.

Revisions

  1. mkottman created this gist Aug 21, 2010.
    13 changes: 13 additions & 0 deletions SciteLuaTraceback.patch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    --- a/LuaExtension.cxx 2010-07-21 01:03:41.000000000 +0200
    +++ b/LuaExtension.cxx 2010-08-21 20:29:55.332214899 +0200
    @@ -722,7 +722,9 @@
    if (L) {
    int traceback = 0;
    if (tracebackEnabled) {
    - lua_getglobal(L, "print");
    + lua_getglobal(L, "debug");
    + lua_getfield(L, -1, "traceback");
    + lua_remove(L, -2);
    if (lua_isfunction(L, -1)) {
    traceback = lua_gettop(L) - nargs - 1;
    lua_insert(L, traceback);