1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-21 10:24:55 +00:00

(CHAR_CHARSET_P): Check if the encoder is loaded or

not before accessing it.
This commit is contained in:
Kenichi Handa 2008-11-29 13:47:31 +00:00
parent 9c6361c98b
commit 8cc53f96e5
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2008-11-29 Kenichi Handa <handa@m17n.org>
* charset.h (CHAR_CHARSET_P): Check if the encoder is loaded or
not before accessing it.
* charset.c (Fdefine_charset_internal): After calculating
min_char, max_char, and fastmap, copy the charset structure again.
(encode_char): Fix the previous change.

View File

@ -503,7 +503,8 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL];
&& ((charset)->method == CHARSET_METHOD_OFFSET \
? (c) >= (charset)->min_char && (c) <= (charset)->max_char \
: ((charset)->method == CHARSET_METHOD_MAP \
&& (charset)->compact_codes_p) \
&& (charset)->compact_codes_p \
&& CHAR_TABLE_P (CHARSET_ENCODER (charset))) \
? ! NILP (CHAR_TABLE_REF (CHARSET_ENCODER (charset), (c))) \
: encode_char ((charset), (c)) != (charset)->invalid_code))))