bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] Added a module stringops that provides STREQ and STRNEQ


From: Eric Blake
Subject: Re: [PATCH] Added a module stringops that provides STREQ and STRNEQ
Date: Wed, 21 May 2014 22:28:26 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/21/2014 10:14 PM, Paul Eggert wrote:
> Kieran Colford wrote:
>> +#define STRNEQ(X, Y) (strcmp (X, Y) != 0)
> 
> 1.  This name is poorly chosen (it looks too much like "strncmp", which
> means something quite different) and it's not needed (people can just
> use "!STREQ").
> 
> 2.  STREQ should be an inline function, not a macro.  There's little
> point to making it a macro.
> 
> 3.  STREQ's name should be lower case.

If it is made an inline function rather than a macro, then yes it should
be lower case.  But if we do this, then we need to update the
syntax-check rule that was created to force the use of STREQ in the
first place, which has a ripple effect on a number of projects already
using STREQ as a macro.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]