summaryrefslogtreecommitdiffstats
path: root/share/txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-09-21 06:38:56 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-09-21 06:38:56 -0700
commitec48df3cd8f6d561c5fa919dc5a3ffee25876401 (patch)
tree126571e25faea2f21c59b277666ecd51dd9cb55a /share/txr
parentb69c2b5735afe0c08b51a626eea8627800a92aa7 (diff)
downloadtxr-ec48df3cd8f6d561c5fa919dc5a3ffee25876401.tar.gz
txr-ec48df3cd8f6d561c5fa919dc5a3ffee25876401.tar.bz2
txr-ec48df3cd8f6d561c5fa919dc5a3ffee25876401.zip
Fix broken sys:rslot place.
This is used in the awk macro. Breaking test case is an update modification of f, like (push 3 f); a broken call to sys:rslotset is generated with a too few arguments. * share/txr/stdlib/struct.tl (defplace sys:rslot): Fix name clash between gensym and parameter. Add the meth-slot-sym parameter into the sys:rslotset call where it is missing as a required parameter.
Diffstat (limited to 'share/txr')
-rw-r--r--share/txr/stdlib/struct.tl8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/txr/stdlib/struct.tl b/share/txr/stdlib/struct.tl
index 0f3d79eb..6bf665fb 100644
--- a/share/txr/stdlib/struct.tl
+++ b/share/txr/stdlib/struct.tl
@@ -269,13 +269,13 @@
(defplace (sys:rslot struct sym meth-sym) body
(getter setter
- (with-gensyms (struct-sym slot-sym meth-sym)
+ (with-gensyms (struct-sym slot-sym meth-slot-sym)
^(slet ((,struct-sym ,struct)
(,slot-sym ,sym)
- (,meth-sym ,meth-sym))
+ (,meth-slot-sym ,meth-sym))
(macrolet ((,getter () ^(slot ,',struct-sym ,',slot-sym))
- (,setter (val) ^(sys:rslotset ,',struct-sym
- ,',slot-sym ,val)))
+ (,setter (val) ^(sys:rslotset ,',struct-sym ,',slot-sym
+ ,',meth-slot-sym ,val)))
,body))))
(ssetter
^(macrolet ((,ssetter (val) ^(progn