I just pushed a commit that implements option 2 above because I felt
that it was a more straightforward approach that can be easily
documented (and is). The alternate approach of `memcpy`ing a static
instance, while simple on the surface, seems a little too in the weeds
for an API caller that may not even realize the static instance exists
unless they happen to find an example. The function will be obvious
enough to keep folks "on the rails" so to speak.
--
Thanks,
Jeff

On Thu, Jul 29, 2021 at 9:31 AM Alan Carroll
<solidwallofc...@verizonmedia.com.invalid> wrote:
>
> >
> > Yes, we don't want to mess around with the actual indexing in this PR.
> >
>
> A couple of thoughts -
>
> 1. We could have a static instance of the options which could be `memcpy`
> into the struct to initialize it to default values.
>
> 2. It's kind of ugly, but we could have a function to initialize an option
> struct to default values.

Reply via email to