[latex3-commits] [git/LaTeX3-latex3-latex3] master: Simplify string.format() copies (b56e6a4)
Joseph Wright
joseph.wright at morningstar2.co.uk
Sun Oct 28 18:41:27 CET 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/b56e6a453b9fdb3f7fbd1c20c86dcdf7ae773d1a
>---------------------------------------------------------------
commit b56e6a453b9fdb3f7fbd1c20c86dcdf7ae773d1a
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sun Oct 28 17:41:27 2018 +0000
Simplify string.format() copies
>---------------------------------------------------------------
b56e6a453b9fdb3f7fbd1c20c86dcdf7ae773d1a
l3kernel/l3luatex.dtx | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/l3kernel/l3luatex.dtx b/l3kernel/l3luatex.dtx
index a5e2b79..7a0f66b 100644
--- a/l3kernel/l3luatex.dtx
+++ b/l3kernel/l3luatex.dtx
@@ -340,7 +340,6 @@ local open = io.open
local os_clock = os.clock
local os_date = os.date
local setcatcode = tex.setcatcode
-local str_format = string.format
local sprint = tex.sprint
local write = tex.write
local utf8_char = unicode.utf8.char
@@ -449,16 +448,16 @@ local function filemoddate(name)
else
local hours = floor(off / 60)
local mins = abs(off - hours * 60)
- timezone = str_format("%+03d", hours)
- .. "'" .. str_format("%02d", mins) .. "'"
+ timezone = format("%+03d", hours)
+ .. "'" .. format("%02d", mins) .. "'"
end
write("D:"
- .. str_format("%04d", d.year)
- .. str_format("%02d", d.month)
- .. str_format("%02d", d.day)
- .. str_format("%02d", d.hour)
- .. str_format("%02d", d.min)
- .. str_format("%02d", d.sec)
+ .. format("%04d", d.year)
+ .. format("%02d", d.month)
+ .. format("%02d", d.day)
+ .. format("%02d", d.hour)
+ .. format("%02d", d.min)
+ .. format("%02d", d.sec)
.. timezone)
end
end
More information about the latex3-commits
mailing list