summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-07-16 22:00:18 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-07-16 22:00:18 -0700
commit3b7766d29ae0bb326962bc68e7f389a358d8e219 (patch)
treec744817e096e41f32e833cbfbe3ecdc1c45db7f8
parent416e0859a97fc98ccdec6a2c438212358e1bc588 (diff)
downloadtxr-3b7766d29ae0bb326962bc68e7f389a358d8e219.tar.gz
txr-3b7766d29ae0bb326962bc68e7f389a358d8e219.tar.bz2
txr-3b7766d29ae0bb326962bc68e7f389a358d8e219.zip
getopts: Fix broken custom function option type.
This was broken on 2016-11-03 by the commit "Support simple list arguments in getopts." The sys:opt-parsed type has no type slot.
-rw-r--r--share/txr/stdlib/getopts.tl4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/txr/stdlib/getopts.tl b/share/txr/stdlib/getopts.tl
index 7cd89cfa..3454b73f 100644
--- a/share/txr/stdlib/getopts.tl
+++ b/share/txr/stdlib/getopts.tl
@@ -134,8 +134,8 @@
rec-type))
pieces)))
(set me.arg (mapcar (usl arg) sub-opts))))
- ((or (symbolp me.type) (functionp me.type))
- (set me.arg (call me.desc.type me.arg))))))))
+ ((or (symbolp type) (functionp type))
+ (set me.arg (call type me.arg))))))))
(defmeth opts lambda (me key : dfl)
(iflet ((o [me.opt-hash key])) o.arg dfl))