diff options
| author | OpportunityLiu <[email protected]> | 2019-07-27 17:08:06 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-07-28 14:45:01 +0800 |
| commit | 72f398835b6846c62a0d8a2a3d442689bf232df4 (patch) | |
| tree | e9c47a7d3783f044877f2d3f3eef2ebb51973cc5 /xmake/core/base/dump.lua | |
| parent | 5f72124406a72da23a816b73c5fa0bd5ec404e57 (diff) | |
use table as stub
Diffstat (limited to 'xmake/core/base/dump.lua')
| -rw-r--r-- | xmake/core/base/dump.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
