[Top][All Lists]

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

Re: [PATCH] stringops: add new module

From: Paul Eggert
Subject: Re: [PATCH] stringops: add new module
Date: Sun, 25 May 2014 15:30:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Kieran Colford wrote:
+/* Test if the strings X and Y are equal. */
+#define STREQ(X, Y) (strcmp (X, Y) == 0)
+/* Test if the strings a and b are equal. */
+static inline bool
+streq (const char *a, const char *b)

I think the latest idea was to have just one name, STREQ, and to have it be an inline function and not a macro.

STREQ shouldn't be static inline; lib/stringops.h should use the _GL_INLINE_HEADER_BEGIN family of macros, like (for example) lib/xtime.h does.

reply via email to

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