Re: [PATCH 11/11] strvec: rename struct fields

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

 



On Tue, Jul 28, 2020 at 11:19 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
> >> I'm actually not that fond of "items". I almost went with just:
> >>
> >>   const char **v;
> >>
> >> as the variable name which contains it usually provides sufficient
> >> context. But I worried that people would consider that too inscrutable.
> >
> > I'd agree that v[] is a good name.  If it is too short, I can live
> > with item[], but not with items[]....
>
> What are individual component of a vector called?  An element?  If
> so, elem[] would be much better name than item[].

Individual components of a string vector or a string array are
strings, so "str" if we abbreviate "string" to "str".

Using "str" would be consistent with oid_array where the individual
component is called "oid" as it is defined this way:

struct oid_array {
        struct object_id *oid;
        size_t nr;
        size_t alloc;
        int sorted;
};



[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]

  Powered by Linux