summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-14 22:24:02 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-14 22:24:02 -0700
commit3151a159c9dda888ff828355b7f44f722a4a2a86 (patch)
tree4d47c59d6f5ad67cc8cb0fdfd0bab79f1032b9b9
parent9db8099420a157e6274395ec7ddbafdc7a0ce6d5 (diff)
downloadtxr-3151a159c9dda888ff828355b7f44f722a4a2a86.tar.gz
txr-3151a159c9dda888ff828355b7f44f722a4a2a86.tar.bz2
txr-3151a159c9dda888ff828355b7f44f722a4a2a86.zip
pic: do mkstring cat macro time.
* share/txr/stdlib/pic.tl (expand-pic-num): The ##...## string that indicates an overflowing field can be created by the macro and inserted into the code as a literal object, rather than inserted as a mkstring call which calculates it run time each time the code is executed.
-rw-r--r--share/txr/stdlib/pic.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/pic.tl b/share/txr/stdlib/pic.tl
index f2805554..8d5ce59e 100644
--- a/share/txr/stdlib/pic.tl
+++ b/share/txr/stdlib/pic.tl
@@ -49,7 +49,7 @@
(with-gensyms (str)
^(let ((,str ,code))
(if (> (len ,str) ,(len fmt))
- (mkstring ,(len fmt) #\#)
+ ,(mkstring (len fmt) #\#)
,str)))
code))))