summaryrefslogtreecommitdiff
path: root/xmake/core/base/io.lua
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-26 11:52:14 +0800
committerOpportunityLiu <[email protected]>2019-07-28 14:45:00 +0800
commit55b29ab3799917fa04b55ac5c8273eadb6045b39 (patch)
tree32520ca2ccaed5e28a9d15693402b0371db533fd /xmake/core/base/io.lua
parent1a1e0c7200d23f53bd1219341bc1dada7b4054a9 (diff)
use a seperate nev to load seriailzed data
Diffstat (limited to 'xmake/core/base/io.lua')
-rw-r--r--xmake/core/base/io.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/core/base/io.lua b/xmake/core/base/io.lua
index 428fdc8c7..d234d52b3 100644
--- a/xmake/core/base/io.lua
+++ b/xmake/core/base/io.lua
@@ -63,8 +63,8 @@ function _file:printf(...)
end
-- save object
-function _file:save(object)
- local str, errors = string.serialize(object, false)
+function _file:save(object, opt)
+ local str, errors = string.serialize(object, opt)
if not errors then
self:write(str)
return str
@@ -226,7 +226,7 @@ function io.save(filepath, object, opt)
end
-- save object to file
- local ok, errors = file:save(object)
+ local ok, errors = file:save(object, opt)
-- close file
file:close()
if not ok then