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

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

 



On Wed, Jul 29, 2020 at 08:55:46AM +0200, Christian Couder wrote:

> > > 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;
> };

Yeah, I agree "str" is a reasonable name, and probably better than
"elem" or "items". I do still like the super-concise "v" better, though.

-Peff



[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