summaryrefslogtreecommitdiff
path: root/xmake/core/base/deprecated/interpreter.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-08-12 10:47:27 +0800
committerruki <[email protected]>2016-08-12 10:47:27 +0800
commit503d201bb94ba0de2e9e61ab66e52c1cee648064 (patch)
tree02f7c4997bbb2ec5defbaa4aa2c498db47fa2e28 /xmake/core/base/deprecated/interpreter.lua
parent708236460a71b712317a5d2e6f834e705e7681a7 (diff)
add set_default api for option
Diffstat (limited to 'xmake/core/base/deprecated/interpreter.lua')
-rw-r--r--xmake/core/base/deprecated/interpreter.lua14
1 files changed, 2 insertions, 12 deletions
diff --git a/xmake/core/base/deprecated/interpreter.lua b/xmake/core/base/deprecated/interpreter.lua
index cb5fa4fdf..80d541da8 100644
--- a/xmake/core/base/deprecated/interpreter.lua
+++ b/xmake/core/base/deprecated/interpreter.lua
@@ -154,13 +154,8 @@ function deprecated_interpreter:_api_register_set_xxx_xxx(scope_kind, apiname)
-- register api
self:api_register_builtin(oldapi, function (value, ...)
- -- check
- if type(value) ~= "string" then
- value = type(value)
- end
-
-- deprecated
- deprecated.add(newapi .. "(\"%s\")", oldapi .. "(\"%s\")", value)
+ deprecated.add(newapi .. "(\"%s\")", oldapi .. "(\"%s\")", tostring(value))
-- dispatch it
apifunc(value, ...)
@@ -183,13 +178,8 @@ function deprecated_interpreter:_api_register_add_xxx_xxx(scope_kind, apiname)
-- register api
self:api_register_builtin(oldapi, function (value, ...)
- -- check
- if type(value) ~= "string" then
- value = type(value)
- end
-
-- deprecated
- deprecated.add(newapi .. "(\"%s\")", oldapi .. "(\"%s\")", value)
+ deprecated.add(newapi .. "(\"%s\")", oldapi .. "(\"%s\")", tostring(value))
-- dispatch it
apifunc(value, ...)