diff options
| author | ruki <[email protected]> | 2019-01-11 22:45:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-01-11 10:35:26 +0800 |
| commit | a1afc21b797df768331f7aff6f4b82f0f896700b (patch) | |
| tree | 366f6f793ffa742b3c08ce0bd89e2bfbdd5a34b6 /xmake/core/base | |
| parent | 3e3f60fb34f4171f8f16370ceb58ef9aae0785f1 (diff) | |
remove some deprecated apis for 1.x
Diffstat (limited to 'xmake/core/base')
| -rw-r--r-- | xmake/core/base/deprecated/interpreter.lua | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/xmake/core/base/deprecated/interpreter.lua b/xmake/core/base/deprecated/interpreter.lua index 11d47b697..fd6de43e2 100644 --- a/xmake/core/base/deprecated/interpreter.lua +++ b/xmake/core/base/deprecated/interpreter.lua @@ -140,53 +140,5 @@ function deprecated_interpreter:api_register_set_script(scope_kind, ...) self:_api_register_xxx_values(scope_kind, "set", implementation, ...) end --- register api: set_xxx_xxx -function deprecated_interpreter:_api_register_set_xxx_xxx(scope_kind, apiname) - - -- the old api - local oldapi = string.format("set_%s_%s", scope_kind, apiname) - - -- the new api - local newapi = string.format("set_%s", apiname) - - -- get api function - local apifunc = self:_api_within_scope(scope_kind, newapi) - assert(apifunc) - - -- register api - self:api_register_builtin(oldapi, function (value, ...) - - -- deprecated - deprecated.add(newapi .. "(\"%s\")", oldapi .. "(\"%s\")", tostring(value)) - - -- dispatch it - apifunc(value, ...) - end) -end - --- register api: add_xxx_xxx -function deprecated_interpreter:_api_register_add_xxx_xxx(scope_kind, apiname) - - -- the old api - local oldapi = string.format("add_%s_%s", scope_kind, apiname) - - -- the new api - local newapi = string.format("add_%s", apiname) - - -- get api function - local apifunc = self:_api_within_scope(scope_kind, newapi) - assert(apifunc) - - -- register api - self:api_register_builtin(oldapi, function (value, ...) - - -- deprecated - deprecated.add(newapi .. "(\"%s\")", oldapi .. "(\"%s\")", tostring(value)) - - -- dispatch it - apifunc(value, ...) - end) -end - -- return module: deprecated_interpreter return deprecated_interpreter |
