Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use luatexbase to register pgfsys@strcmp #1364

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading