summaryrefslogtreecommitdiff
path: root/tex/context/base/cldf-bas.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/cldf-bas.lua')
-rw-r--r--tex/context/base/cldf-bas.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/tex/context/base/cldf-bas.lua b/tex/context/base/cldf-bas.lua
index 6adeb2272..b982fc364 100644
--- a/tex/context/base/cldf-bas.lua
+++ b/tex/context/base/cldf-bas.lua
@@ -38,7 +38,8 @@ local new_rule = nodepool.rule
local new_glyph = nodepool.glyph
local current_font = font.current
-local texcount = tex.count
+local texgetcount = tex.getcount
+local texsetcount = tex.setcount
function context.char(k) -- used as escape too, so don't change to utf
if type(k) == "table" then
@@ -163,9 +164,9 @@ context.endhbox = context.egroup
local function allocate(name,what,cmd)
local a = format("c_syst_last_allocated_%s",what)
- local n = texcount[a] + 1
- if n <= texcount.c_syst_max_allocated_register then
- texcount[a] = n
+ local n = texgetcount(a) + 1
+ if n <= texgetcount("c_syst_max_allocated_register") then
+ texsetcount(a,n)
end
context("\\global\\expandafter\\%sdef\\csname %s\\endcsname %s\\relax",cmd or what,name,n)
return n