diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-12-12 15:17:15 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-12-13 08:18:46 -0800 |
commit | 2eaa8bdbb3a6d426a9de4d916dad63f77fd54092 (patch) | |
tree | 78afe7ac5261539fa266f36bb36c84538f8518b6 /tests/012/oop-mi.expected | |
parent | fdba58530a48223ecd0c9bcf629f08c3569d6c75 (diff) | |
download | txr-2eaa8bdbb3a6d426a9de4d916dad63f77fd54092.tar.gz txr-2eaa8bdbb3a6d426a9de4d916dad63f77fd54092.tar.bz2 txr-2eaa8bdbb3a6d426a9de4d916dad63f77fd54092.zip |
define-option-struct: use multiple inheritance
* share/txr/stdlib/getopts.tl (sys:option-base): New struct
type, holding the boiler-plate methods and slots that were
generated into the user-defined struct by
define-option-struct.
(define-option-struct): Inject the required properties by
inheritance from sys:option-base, greatly reducing code bloat
in the macro. The slot hash and opt-desc-list static slots
have to be redefined in the derived structure so that type has
its own instance of them.
Diffstat (limited to 'tests/012/oop-mi.expected')
0 files changed, 0 insertions, 0 deletions