From bce263cf9df425b896b62e24589ccebf6e703a88 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 28 Nov 2019 17:14:02 -0800 Subject: 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. --- share/txr/stdlib/getopts.tl | 5 ++--- 1 file 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)) -- cgit v1.2.3