summaryrefslogtreecommitdiff
path: root/xmake/languages/c++/load.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-10-02 23:29:03 +0800
committerruki <[email protected]>2021-10-02 23:29:03 +0800
commite80a41789b0de5f2249c15d57486fd3a4b40ff99 (patch)
treef3a893345c8da889236e68775dc3de92f1a092e9 /xmake/languages/c++/load.lua
parentd4789ff5e968294bf2e9831209d0cf61b61c9d43 (diff)
save and restore scope
Diffstat (limited to 'xmake/languages/c++/load.lua')
-rw-r--r--xmake/languages/c++/load.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/languages/c++/load.lua b/xmake/languages/c++/load.lua
index 12fb5283b..16380ab3c 100644
--- a/xmake/languages/c++/load.lua
+++ b/xmake/languages/c++/load.lua
@@ -68,7 +68,7 @@ function _api_add_cfunc(interp, module, alias, links, includes, func)
end
-- save the current scope
- local scope = interp:scope_save()
+ interp:api_builtin_save_scope()
-- check option
interp:api_call("option", name)
@@ -78,7 +78,7 @@ function _api_add_cfunc(interp, module, alias, links, includes, func)
if includes then interp:api_call("add_cincludes", includes) end
-- restore the current scope
- interp:scope_restore(scope)
+ interp:api_builtin_restore_scope()
-- add this option
interp:api_call("add_options", name)
@@ -120,7 +120,7 @@ function _api_add_cxxfunc(interp, module, alias, links, includes, func)
end
-- save the current scope
- local scope = interp:scope_save()
+ interp:api_builtin_save_scope()
-- check option
interp:api_call("option", name)
@@ -130,7 +130,7 @@ function _api_add_cxxfunc(interp, module, alias, links, includes, func)
if includes then interp:api_call("add_cxxincludes", includes) end
-- restore the current scope
- interp:scope_restore(scope)
+ interp:api_builtin_restore_scope()
-- add this option
interp:api_call("add_options", name)