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 | bce263cf9df425b896b62e24589ccebf6e703a88 (patch) | |
tree | 19552c02c2fa076828278eb4688e512f7ef09bba | |
parent | 4af4ee05e6a5935e881672dc90a0e8ddbf452e71 (diff) | |
download | txr-bce263cf9df425b896b62e24589ccebf6e703a88.tar.gz txr-bce263cf9df425b896b62e24589ccebf6e703a88.tar.bz2 txr-bce263cf9df425b896b62e24589ccebf6e703a88.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)) |