Re: [RFC 2/2] Future Proofing: Pass around pointers to either functions or data
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 30, 2011, 19:41 UTC
- Message-ID
- <7vlizwmm4o.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <AANLkTi=nxA0BrLruQ9zc_SajH2ghpZX14Ra7QOo9fMBx@mail.gmail.com>
Erik Faye-Lund <kusmabite@gmail.com> writes:
Show 12 quoted lines
> On Tue, Mar 29, 2011 at 5:28 PM, Michael Witten <mfwitten@gmail.com> wrote:
>> +#define ALT_ODB_FN_INFO_FUNC(variable, function) \
>> + union alt_odb_fn_info variable = { \
>> + .func = (alt_odb_fn_cb)function \
>> + }
>> +#define ALT_ODB_FN_INFO_DATA(variable, data_) \
>> + union alt_odb_fn_info variable = { \
>> + .data = data_ \
>> + }
>
> We try to stay away from C99 features like this, as it doesn't work on
> all compilers we target.I had an impression that 1/2 is a good fix but 2/2 is going overboard with a theoretical exercise without real gain.