Skip to content

Commit

Permalink
fix: use luatexbase to register pgfsys@strcmp
Browse files Browse the repository at this point in the history
Signed-off-by: Henri Menke <[email protected]>
  • Loading branch information
hmenke committed Oct 6, 2024
1 parent 4da661c commit e828e69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tex/generic/pgf/systemlayer/pgfsys.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,8 @@
\else\ifdefined\directlua
\directlua{
local lft = lua.get_functions_table()
lft[\string#lft+1] = function()
local fid = luatexbase and luatexbase.new_luafunction("pgfsys@strcmp") or \string#lft+1
lft[fid] = function()
local lhs = token.scan_string()
local rhs = token.scan_string()
if lhs < rhs then
Expand All @@ -1736,7 +1737,7 @@
tex.sprint(-2, "1")
end
end
token.set_lua("pgfsys@strcmp", \string#lft, "global")
token.set_lua("pgfsys@strcmp", fid, "global")
}
\else
\def\pgfsys@strcmp#1#2{\pgf@sys@fail{string comparison}}%
Expand Down

0 comments on commit e828e69

Please sign in to comment.