Re: [PATCH v2 07/25] reftable: (de)serialization for the polymorphic record type.
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Aug 17, 2021, 13:44 UTC
- Message-ID
- <CAFQ2z_O1mJEqnxow-SLytiPwh_Pgnsupdi5ORgE4Q6KULmuLoA@mail.gmail.com>
- In-Reply-To
- <YRresPEnuv9EwBgS@carlos-mbp.lan>
On Mon, Aug 16, 2021 at 11:54 PM Carlo Marcelo Arenas Belón <carenas@gmail.com> wrote:
Show 18 quoted lines
>
> On Mon, Aug 16, 2021 at 08:16:58PM +0000, Han-Wen Nienhuys via GitGitGadget wrote:
> > From: Han-Wen Nienhuys <hanwen@google.com>
> ...
> > + union {
> > + struct {
> > + uint8_t *new_hash;
> > + uint8_t *old_hash;
> > + char *name;
> > + char *email;
> > + uint64_t time;
> > + int16_t tz_offset;
> > + char *message;
> > + } update;
> > + };
>
> the use of an anonymous union here (which requires C11) could be made
> C89 compatible without any impact AFAIK by doing instead:Thanks for the pointer. I opted to do it the C89 way instead, for consistency with reftable_ref_record.
-- Han-Wen Nienhuys - Google Munich I work 80%. Don't expect answers from me on Fridays. -- Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Paul Manicle, Halimah DeLaine Prado