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}}%