summaryrefslogtreecommitdiff
path: root/tex/context/base/attr-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/attr-ini.lua')
-rw-r--r--tex/context/base/attr-ini.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/tex/context/base/attr-ini.lua b/tex/context/base/attr-ini.lua
index 206a86d79..ad4081681 100644
--- a/tex/context/base/attr-ini.lua
+++ b/tex/context/base/attr-ini.lua
@@ -20,6 +20,9 @@ local attributes = attributes
local sharedstorage = storage.shared
+local texgetcount = tex.getcount
+local texsetattribute = tex.setattribute
+
attributes.names = attributes.names or { }
attributes.numbers = attributes.numbers or { }
attributes.list = attributes.list or { }
@@ -64,7 +67,7 @@ sharedstorage.attributes_last_private = sharedstorage.attributes_last_private or
-- setmetatable(private, {
-- __index = function(t,name)
-- local number = sharedstorage.attributes_last_private
--- if number < 1023 then -- tex.count.minallocatedattribute - 1
+-- if number < 1023 then -- texgetcount("minallocatedattribute") - 1
-- number = number + 1
-- sharedstorage.attributes_last_private = number
-- end
@@ -81,7 +84,7 @@ function attributes.private(name) -- at the lua end (hidden from user)
local number = numbers[name]
if not number then
local last = sharedstorage.attributes_last_private
- if last < 1023 then -- tex.count.minallocatedattribute - 1
+ if last < 1023 then -- texgetcount("minallocatedattribute") - 1
last = last + 1
sharedstorage.attributes_last_private = last
else
@@ -155,7 +158,7 @@ function commands.restorecurrentattributes(name)
local font = t.font
if attr then
for k, v in next, attr do
- tex.attribute[k] = v
+ texsetattribute(k,v)
end
end
if font then