summaryrefslogtreecommitdiff
path: root/xmake/core/base/dump.lua
diff options
context:
space:
mode:
authorOpportunity <[email protected]>2020-01-15 11:24:36 +0800
committerOpportunity <[email protected]>2020-01-15 11:24:36 +0800
commit9862d1b95fa5978eaf24d65f1ca5f151d410a14b (patch)
tree2cac28495cfc70402a60d1b244dc4a801d484eb5 /xmake/core/base/dump.lua
parenteb1effdccd96425375af083d45a94a790f0c6d56 (diff)
Improve options parsing
Diffstat (limited to 'xmake/core/base/dump.lua')
-rw-r--r--xmake/core/base/dump.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/base/dump.lua b/xmake/core/base/dump.lua
index 5b61ba276..3adb54133 100644
--- a/xmake/core/base/dump.lua
+++ b/xmake/core/base/dump.lua
@@ -278,7 +278,7 @@ function dump._print_table(value, first_indent, remain_indent, printed_set)
printed_set, first_level = dump._get_printed_set(printed_set, value)
io.write(first_indent)
local metatable = debug.getmetatable(value)
- local tostringmethod = metatable and rawget(metatable, "__tostring")
+ local tostringmethod = metatable and (rawget(metatable, "__todisplay") or rawget(metatable, "__tostring"))
if not first_level and tostringmethod then
local ok, strrep = pcall(tostringmethod, value, value)
if ok then