From e828e69adbc53011fe919ea4df0d9a7622a6a79b Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Sun, 6 Oct 2024 19:44:25 +0200 Subject: [PATCH] fix: use luatexbase to register pgfsys@strcmp Signed-off-by: Henri Menke --- tex/generic/pgf/systemlayer/pgfsys.code.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tex/generic/pgf/systemlayer/pgfsys.code.tex b/tex/generic/pgf/systemlayer/pgfsys.code.tex index a67329729..0c99fb830 100644 --- a/tex/generic/pgf/systemlayer/pgfsys.code.tex +++ b/tex/generic/pgf/systemlayer/pgfsys.code.tex @@ -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 @@ -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}}%