Order change in 'pushfuncname'
'pushglobalfuncname' can be quite slow (as it traverses all globals and all loaded modules), so try first to get a name from the code.
This commit is contained in:
@@ -701,7 +701,7 @@ assert(debug.traceback(print, 4) == print)
|
||||
assert(string.find(debug.traceback("hi", 4), "^hi\n"))
|
||||
assert(string.find(debug.traceback("hi"), "^hi\n"))
|
||||
assert(not string.find(debug.traceback("hi"), "'debug.traceback'"))
|
||||
assert(string.find(debug.traceback("hi", 0), "'debug.traceback'"))
|
||||
assert(string.find(debug.traceback("hi", 0), "'traceback'"))
|
||||
assert(string.find(debug.traceback(), "^stack traceback:\n"))
|
||||
|
||||
do -- C-function names in traceback
|
||||
@@ -829,7 +829,7 @@ end
|
||||
|
||||
co = coroutine.create(function (x) f(x) end)
|
||||
a, b = coroutine.resume(co, 3)
|
||||
t = {"'coroutine.yield'", "'f'", "in function <"}
|
||||
t = {"'yield'", "'f'", "in function <"}
|
||||
while coroutine.status(co) == "suspended" do
|
||||
checktraceback(co, t)
|
||||
a, b = coroutine.resume(co)
|
||||
|
||||
Reference in New Issue
Block a user