diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-06-10 16:38:16 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-06-10 16:38:16 +0200 |
commit | bd8f4d00a5ba1af56451821cd1db1c12c22f5419 (patch) | |
tree | 4dffba85530d56d31a05684c7c071b77d163371a /tex/context/base/mkiv/mlib-lua.lua | |
parent | 93dccfc40625a754b372edd228724969b28e4342 (diff) | |
download | context-bd8f4d00a5ba1af56451821cd1db1c12c22f5419.tar.gz |
2018-06-10 15:49:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-lua.lua')
-rw-r--r-- | tex/context/base/mkiv/mlib-lua.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/mlib-lua.lua b/tex/context/base/mkiv/mlib-lua.lua index 1faefa68e..675be15bc 100644 --- a/tex/context/base/mkiv/mlib-lua.lua +++ b/tex/context/base/mkiv/mlib-lua.lua @@ -26,14 +26,14 @@ local report_message = logs.reporter("metapost") local trace_luarun = false trackers.register("metapost.lua",function(v) trace_luarun = v end) local trace_enabled = true -local be_tolerant = true directives.register("metapost.lua.tolerant",function(v) be_tolerant = v end) +local be_tolerant = true directives.register("metapost.lua.tolerant", function(v) be_tolerant = v end) mp = mp or { } -- system namespace MP = MP or { } -- user namespace local buffer = { } local n = 0 -local max = 10 -- we reuse upto max +local max = 20 -- we reuse upto max local nesting = 0 function mp._f_() @@ -376,6 +376,8 @@ function metapost.nofscriptruns() return runs end +-- there is no gain in: +-- -- local cache = table.makeweak() -- -- f = cache[code] @@ -393,7 +395,6 @@ end function metapost.runscript(code) nesting = nesting + 1 - local trace = trace_enabled and trace_luarun if trace then report_luarun("%i: code: %s",nesting,code) @@ -431,7 +432,6 @@ function metapost.runscript(code) else report_luarun("%i: no result, invalid code: %s",nesting,code) end - nesting = nesting - 1 return "" end |