[Uim] Re: Suggestion: implement uim_get_language_name_from_locale() by Scheme

TOKUNAGA Hiroyuki tkng at xem.jp
Sun Oct 3 22:44:59 EEST 2004


On Mon, 04 Oct 2004 01:34:03 +0900
YamaKen <yamaken at bp.iij4u.or.jp> wrote:

> I had already written an alternative implementation of
> uim_get_language_name_from_locale() in Scheme originally written
> in C.
> 
> I think that we should implement such functionalities by Scheme
> to acquire flexibility. In this case, we can also perform
> langcode -> langname translation in Scheme world by the
> alternative implementation.

In most cases, flexibility is important, I think. But in this case, do
we need flexibility? Could you give me an example?

> I had already committed the alternative implementation into
> uim-util.c by r1368 and original C implementation is disabled by
> #if 0.  But the alternative requires a change of return type.
> 
> The C implementation returns gettext()'ed string, so the return
> type is defined as 'const char *'. But the alternative returns
> dynamically allocated string since the string is converted from
> a Scheme string. So the implementation must return 'char *' to
> be free()'ed by caller.

If flexibility is needed here, this change would be reasonable.


-- 
TOKUNAGA Hiroyuki
http://kodou.net/



More information about the uim mailing list