From 72f398835b6846c62a0d8a2a3d442689bf232df4 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Sat, 27 Jul 2019 17:08:06 +0800 Subject: use table as stub --- xmake/core/base/dump.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmake/core/base/dump.lua') diff --git a/xmake/core/base/dump.lua b/xmake/core/base/dump.lua index ce3b87b91..cac43ebf3 100644 --- a/xmake/core/base/dump.lua +++ b/xmake/core/base/dump.lua @@ -248,7 +248,7 @@ end function dump._print_udata(value, first_indent, remain_indent, printed_set) local first_level - local metatable = getmetatable(value) + local metatable = debug.getmetatable(value) printed_set, first_level = dump._get_printed_set(printed_set, metatable) io.write(first_indent) @@ -277,7 +277,7 @@ function dump._print_table(value, first_indent, remain_indent, printed_set) local first_level printed_set, first_level = dump._get_printed_set(printed_set, value) io.write(first_indent) - local metatable = getmetatable(value) + local metatable = debug.getmetatable(value) local tostringmethod = metatable and rawget(metatable, "__tostring") if not first_level and tostringmethod then local ok, strrep = pcall(tostringmethod, value, value) -- cgit v1.3.1