diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-11-28 17:14:02 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-11-28 17:14:02 -0800 |
commit | 0c380e635073259efa31a23619b9f7b47c1f5b18 (patch) | |
tree | 19552c02c2fa076828278eb4688e512f7ef09bba | |
parent | 18bbe6a0ae4d12bc8956850c4d94f28455c4f448 (diff) | |
download | txr-0c380e635073259efa31a23619b9f7b47c1f5b18.tar.gz txr-0c380e635073259efa31a23619b9f7b47c1f5b18.tar.bz2 txr-0c380e635073259efa31a23619b9f7b47c1f5b18.zip |
getopts: remove unused opt-processor slot from opts.
* share/txr/stdlib/getopts.tl (opts): opt-processor slot
removed.
(sys:opt-processor parse-opts): When instantiating opts, do
not initialize the opt-processor slot with a backpointer to
self object. It is not referenced anywhere.
-rw-r--r-- | share/txr/stdlib/getopts.tl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/share/txr/stdlib/getopts.tl b/share/txr/stdlib/getopts.tl index a9f47d61..a7c27d94 100644 --- a/share/txr/stdlib/getopts.tl +++ b/share/txr/stdlib/getopts.tl @@ -47,8 +47,7 @@ (defstruct opts nil (opt-hash (hash :equal-based)) ;; string to sys:opt-parsed in-args - out-args - opt-processor) ;; sys:opt-processor + out-args) (defstruct sys:opt-processor nil od-list @@ -197,7 +196,7 @@ (sys:opt-err "unrecognized option: -~a" o)))) (defmeth sys:opt-processor parse-opts (me args) - (let ((out (new opts in-args args out-args args opt-processor me))) + (let ((out (new opts in-args args out-args args))) (whilet ((arg (pop out.out-args))) (cond ((equal "--" arg) (return)) |