On Tue, Feb 22, 2022 at 07:40:44PM +0800, Kent Gibson wrote: > On Mon, Feb 21, 2022 at 04:40:54PM +0100, Bartosz Golaszewski wrote: > > We've already added getters for line-config but without exposing some > > parts of the internal logic of the object, the user can't really get > > the full picture and inspect the contents. This patch reworks the > > accessors further by providing access to the underlying override > > mechanism. > > > > For every setting, we expose a getter and setter for the default value > > as well as a set of four functions for setting, getting, clearing and > > checking per-offset overrides. > > > > An override can initially have the same value as the defaults but will > > retain the overridden value should the defaults change. > > > > We also complete the API by providing functions that allow to identify > > offsets for which at least one setting is overriden. > > > > This way the caller can fully inspect the line_config and high-level > > language bindings can provide stringification methods. > > > > While at it: we fix a couple bugs in the implementation of struct > > line_config. > > > > TLDR: I've got a lot of nitpicks on the doco, but it might be simpler > for you to apply this patch as is and for me to submit a patch with doco > tweaks than for you to try to sort out my comments! > > The actual code looks good, so > > Reviewed-by: Kent Gibson <warthog618@xxxxxxxxx> > > with or without the suggested doco changes. Thank you, Kent, for persistent review, I'm sorry, folks, I have no time to look into this, but I believe that you together will give good enough result and we can amend it later. -- With Best Regards, Andy Shevchenko