Re: [PATCH 4/5] config.c: add a "tristate" helper

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

 



Jeff King <peff@xxxxxxxx> writes:

> So a function like:
>
>   int git_parse_tristate(const char *value, int *out);
>
> which returned success/error via its return value, and put the value
> into "out" would feel pretty natural to me.

Yeah, with s/tristate/bool-or-auto/, and if we do this throughout
the types, that would be ideal.  FWIW git_parse_ulong() and friends
for sized numerics already follow that pattern, but helpers for
boolean like git_parse_maybe_bool() don't, which is unfortunate.



[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