bug-texinfo
[Top][All Lists]
Advanced

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

Re: [PATCH] Add !HAVE_MBRTOWC fallbacks for mbchar, mbiter and mbuiter


From: Miloslav Trmac
Subject: Re: [PATCH] Add !HAVE_MBRTOWC fallbacks for mbchar, mbiter and mbuiter
Date: Tue, 20 Feb 2007 16:55:55 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20070212)

Hello,
Bruno Haible napsal(a):
> There are probably two uses of the mbchar, mbfile, mbiter, mbuiter modules:
>   (a) Use them only for MB_CUR_MAX > 1, and use simpler datatypes (just
>       'char' and pointers) for MB_CUR_MAX = 1.
>   (b) Use them always.
> 
> Since the speed difference between both approaches can be considerable,
> (a factor of 5 is not unusual), in gnulib we're most often using approach (a).
> Whereas your macros appear to be made for case (b) and not well usable for
> case (a).
Yes, OTOH you can still use them as in (a) without losing anything.

> Also, when MB_CUR_MAX = 1, the 'struct mbchar' can be replaced by a single
> 'char' - there is no need for a 'valid' boolean.
I have left c_valid to allow implementing the mbfile.h fallback, which
needs to distinguish between ELF and other char values.

> What do you think? Can this code be useful for you?
The macro approach is certainly technically optimal, OTOH I'm not sure
what the effect on the info source code would be.  It seems quite a few
functions would move to such include files, making the source code more
difficult to navigate.

Karl, what do you think?
        Mirek




reply via email to

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