summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/base/optex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/base/optex.lua')
-rw-r--r--macros/luatex/optex/base/optex.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/macros/luatex/optex/base/optex.lua b/macros/luatex/optex/base/optex.lua
index 8201b8b306..9bc8d6f7d8 100644
--- a/macros/luatex/optex/base/optex.lua
+++ b/macros/luatex/optex/base/optex.lua
@@ -1,4 +1,4 @@
--- This is part of OpTeX project, see http://petr.olsak.net/optex
+-- This is part of the OpTeX project, see http://petr.olsak.net/optex
-- The basic lua functions and declarations used in \OpTeX/ are here
@@ -20,10 +20,9 @@ alloc = alloc or {}
--
-- An attribute allocator in Lua that cooperates with normal \OpTeX/ allocator.
local attributes = {}
-local attribute_max = registernumber("_maiattribute")
function alloc.new_attribute(name)
local cnt = tex.count["_attributealloc"] + 1
- if cnt > attribute_max then
+ if cnt > 65534 then
tex.error("No room for a new attribute")
else
tex.setcount("global", "_attributealloc", cnt)
@@ -33,6 +32,9 @@ function alloc.new_attribute(name)
end
end
--
+-- `provides_module` is needed by older version of luaotfload
+provides_module = function() end
+--
-- CALLBACKS
callback = callback or {}
--
@@ -341,6 +343,7 @@ end)
luatexbase = {
registernumber = registernumber,
attributes = attributes,
+ provides_module = provides_module,
new_attribute = alloc.new_attribute,
callback_descriptions = callback.callback_descriptions,
create_callback = callback.create_callback,