diff options
| author | ruki <[email protected]> | 2019-02-03 12:20:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-02-03 12:20:55 +0800 |
| commit | 2c7a2ff446fd7ad85922a2990d6452627133c8c3 (patch) | |
| tree | e1502c769f9e1aa590e37b571d453a6123e9cc53 /xmake/core/base/interpreter.lua | |
| parent | e35595f73271cb14363c027694183dec3a32e910 (diff) | |
improve deprecated tips
Diffstat (limited to 'xmake/core/base/interpreter.lua')
| -rw-r--r-- | xmake/core/base/interpreter.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua index 544c2dd5e..4cf4dc307 100644 --- a/xmake/core/base/interpreter.lua +++ b/xmake/core/base/interpreter.lua @@ -396,6 +396,28 @@ function interpreter:_api_within_scope(scope_kind, apiname) end end +-- set api function within scope +function interpreter:_api_within_scope_set(scope_kind, apiname, apifunc) + + -- the private + local priv = self._PRIVATE + assert(priv) + + -- the scopes + local scopes = priv._SCOPES + assert(scopes) + + -- get scope api + if scope_kind and priv._APIS then + + -- get api function + local api_scope = priv._APIS[scope_kind] + if api_scope then + api_scope[apiname] = apifunc + end + end +end + -- clear results function interpreter:_clear() |
