bug-gnulib
[Top][All Lists]
Advanced

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

Re: Call to locale_charset within wcwidth


From: Daiki Ueno
Subject: Re: Call to locale_charset within wcwidth
Date: Fri, 06 Feb 2015 22:15:06 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Sorry for the typos in the previous post, and I apologize if I
misrepresent anyone or anything.

>> If this is too specialized to go into gnulib, would it be easy for a
>> project to use its own replacement functions instead of the ones from
>> gnulib?

For this, can't the caller (info-utils.c) simply do "#undef wcwidth"
after including <wchar.h>?  Though perhaps it might not work with C++.

>>   int
>> ! wcwidth_given_encoding (wchar_t wc, const char *encoding)
>
> This will make consumers to replace all wcwidth calls with this new
> function, which is good as a short-term solution and breaks consistency
> with other similar functions, like mbrtowc.

"not good", I meant.  In addition to the above reasons, the name sounds
that it's leaking the implementation detail, unless it is documented
(e.g. "ENCODING is only used as a hint for performance").

Regards,
--
Daiki Ueno



reply via email to

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