Re: [PATCH 01/72] gettext.h: add no-op _() and N_() wrappers
On Sun, Feb 20, 2011 at 3:01 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 10 quoted lines
> Ævar Arnfjörð Bjarmason wrote:
>> +#define N_(s) (s)
>
> Might be nice to make this an inline function, for type safety.
>
>> +#define _(s) (s)
>
> This one can't be a function, though, since it needs to transform
> literals to literals.
>
Show 10 quoted lines
> -#define N_(s) (s)
> -#define _(s) (s)
> +
> +static inline const char *_(const char *msgid)
> +{
> + return msgid;
> +}
> +
> +/* Mark msgid for translation but do not translate it. */
> +#define N_(msgid) (msgid)Isn't this the opposite of what you suggested above?