[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looking through multibyte_char_to_unibyte
From: |
Eli Zaretskii |
Subject: |
Re: Looking through multibyte_char_to_unibyte |
Date: |
Sun, 22 Jun 2014 20:47:53 +0300 |
> Date: Sun, 22 Jun 2014 21:35:52 +0400
> From: Dmitry Antipov <address@hidden>
> CC: address@hidden, address@hidden
>
> > If so, that branch is never taken, and will be optimized
> > away by any reasonable compiler.
>
> If so, can I assume that the following cleanup is correct?
Looks OK to me, except that here:
> /* Return the raw 8-bit byte for character C. */
> -#define CHAR_TO_BYTE8(c) \
> - (CHAR_BYTE8_P (c) \
> - ? (c) - 0x3FFF00 \
> - : multibyte_char_to_unibyte (c))
> +#define CHAR_TO_BYTE8(c) \
> + (ASCII_CHAR_P (c) ? c \
> + : (CHAR_BYTE8_P (c) ? (c) - 0x3FFF00 : (c & 0xFF)))
why do you need a separate test for ASCII_CHAR_P?