Re: [PATCH v2 18/43] refs-be-files.c: add a backend method structure with transaction functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2015-10-05 at 10:25 -0700, Junio C Hamano wrote:
> Michael Haggerty <mhagger@xxxxxxxxxxxx> writes:
> 
> >> +/* refs backends */
> >> +typedef struct ref_transaction *(*ref_transaction_begin_fn)(struct strbuf *err);
> >
> > Hmmm, I thought our convention was to define typedefs for functions
> > themselves, not for the pointer-to-function; e.g.,
> >
> >     typedef struct ref_transaction *ref_transaction_begin_fn(struct
> > strbuf *err);
> >
> > (which would require `struct ref_be` to be changed to
> >
> >         ref_transaction_begin_fn *transaction_begin;
> >
> > etc.) But now as I grep through the code it looks like both conventions
> > are used. So never mind :-)
> 
> Well spotted.  My recollection is the same and we do prefer the
> latter (I think all early function typedefs by Linus were done that
> way).  It would be better to correct existing mistakes we added over
> time and certainly not add more of them in new code.

Will fix, thanks.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]