Skip to content

Commit

Permalink
keep local references to debug library in case it is redefined by user
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmaclarty committed Jun 22, 2020
1 parent e328313 commit 02b3304
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/extra.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
-- extra table functions

local debug = _G.debug

function table.shallow_copy(t)
if type(t) ~= "table" then
error("table expected, but got a "..type(t), 2)
Expand Down
2 changes: 2 additions & 0 deletions lua/traceback.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local debug = _G.debug

local remove_c_stack_slots = true

function am._traceback(msg, thread)
Expand Down

0 comments on commit 02b3304

Please sign in to comment.