diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2015-07-22 08:14:33 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2015-07-22 08:14:33 +0200 |
commit | edc2e10dc7bb7a98ecfd0e68e122b3a868caacee (patch) | |
tree | a1ff17a7021a22777c8edfa5483d7101763f3ae4 /src/luaotfload-init.lua | |
parent | 6eff203e9bf3348d090b6b5046466415bcd6530a (diff) | |
download | luaotfload-edc2e10dc7bb7a98ecfd0e68e122b3a868caacee.tar.gz |
[init] make saved globals inaccessible
Diffstat (limited to 'src/luaotfload-init.lua')
-rw-r--r-- | src/luaotfload-init.lua | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua index 5c237e7..ac27b2c 100644 --- a/src/luaotfload-init.lua +++ b/src/luaotfload-init.lua @@ -180,11 +180,8 @@ end local init_adapt = function () - luaotfload.context_environment = { } - luaotfload.push_namespaces = push_namespaces - luaotfload.pop_namespaces = pop_namespaces - - local our_environment = push_namespaces () + local context_environment = { } + local our_environment = push_namespaces () --[[doc-- @@ -196,7 +193,7 @@ local init_adapt = function () tex.attribute[0] = 0 - return our_environment + return our_environment, context_environment end --- [init_adapt] @@ -277,9 +274,9 @@ local init_cleanup = function (store) --doc]]-- - luaotfload.pop_namespaces (store.our_environment, - false, - luaotfload.context_environment) + pop_namespaces (store.our_environment, + false, + store.context_environment) --[[doc-- @@ -414,7 +411,7 @@ return { init = function () local starttime = os.gettimeofday () local store = init_pre () - store.our_environment = init_adapt () + store.our_environment, store.context_environment = init_adapt () init_main () init_cleanup (store) logreport ("both", 1, "init", |