aboutsummaryrefslogtreecommitdiffstats
path: root/src/theming/lua-lib/expect.lua
diff options
context:
space:
mode:
authoralyx <alyx@aleteoryx.me>2024-04-05 17:27:46 -0400
committeralyx <alyx@aleteoryx.me>2024-04-05 17:27:46 -0400
commit79999cecedd84e99655fbcdba0bd4e715a22173f (patch)
tree0a14c94c92d196c1bf73f2648c2ebacfe6a03500 /src/theming/lua-lib/expect.lua
parentca7c46e535ac60a976a8c60477fa9424c46b6e3f (diff)
downloadlfm_embed-79999cecedd84e99655fbcdba0bd4e715a22173f.tar.gz
lfm_embed-79999cecedd84e99655fbcdba0bd4e715a22173f.tar.bz2
lfm_embed-79999cecedd84e99655fbcdba0bd4e715a22173f.zip
Lua support feature-complete
Full implementation of debug mode still pending
Diffstat (limited to 'src/theming/lua-lib/expect.lua')
-rw-r--r--src/theming/lua-lib/expect.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/theming/lua-lib/expect.lua b/src/theming/lua-lib/expect.lua
index 9afbb49..20772b2 100644
--- a/src/theming/lua-lib/expect.lua
+++ b/src/theming/lua-lib/expect.lua
@@ -50,7 +50,7 @@ local function get_display_type(value, t)
-- Cobalt and only read the metatable for tables/userdata.
if t ~= "table" and t ~= "userdata" then return t end
- local metatable = debug.getmetatable(value)
+ local metatable = getmetatable(value)
if not metatable then return t end
local name = rawget(metatable, "__name")
@@ -72,8 +72,8 @@ local function expect(index, value, ...)
-- If we can determine the function name with a high level of confidence, try to include it.
local name
- local ok, info = pcall(debug.getinfo, 3, "nS")
- if ok and info.name and info.name ~= "" and info.what ~= "C" then name = info.name end
+ -- local ok, info = pcall(debug.getinfo, 3, "nS")
+ -- if ok and info.name and info.name ~= "" and info.what ~= "C" then name = info.name end
t = get_display_type(value, t)