diff options
| author | Kenichi Handa | 1997-03-03 01:54:26 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-03-03 01:54:26 +0000 |
| commit | 040df2c773d81cfaa0c3e1314e5f0e19a23563cf (patch) | |
| tree | 49568beee67fb36296f54c6b58523b10840c9148 /src | |
| parent | bc43b8e83a3fb8b256258582324f1c375eacd58f (diff) | |
| download | emacs-040df2c773d81cfaa0c3e1314e5f0e19a23563cf.tar.gz emacs-040df2c773d81cfaa0c3e1314e5f0e19a23563cf.zip | |
(CATEGORY_SET): Cast arg C to
`unsigned char' before indexing category table directly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/category.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/category.h b/src/category.h index 956c6284b36..b51cb4d1d5a 100644 --- a/src/category.h +++ b/src/category.h | |||
| @@ -101,8 +101,8 @@ extern Lisp_Object _temp_category_set; | |||
| 101 | #define CATEGORY_SET(c) \ | 101 | #define CATEGORY_SET(c) \ |
| 102 | ({ Lisp_Object table = current_buffer->category_table; \ | 102 | ({ Lisp_Object table = current_buffer->category_table; \ |
| 103 | Lisp_Object temp; \ | 103 | Lisp_Object temp; \ |
| 104 | if (c < CHAR_TABLE_ORDINARY_SLOTS) \ | 104 | if ((c) < CHAR_TABLE_ORDINARY_SLOTS) \ |
| 105 | while (NILP (temp = XCHAR_TABLE (table)->contents[c]) \ | 105 | while (NILP (temp = XCHAR_TABLE (table)->contents[(unsigned char) c]) \ |
| 106 | && NILP (temp = XCHAR_TABLE (table)->defalt)) \ | 106 | && NILP (temp = XCHAR_TABLE (table)->defalt)) \ |
| 107 | table = XCHAR_TABLE (table)->parent; \ | 107 | table = XCHAR_TABLE (table)->parent; \ |
| 108 | else \ | 108 | else \ |
| @@ -110,9 +110,11 @@ extern Lisp_Object _temp_category_set; | |||
| 110 | COMPOSITE_CHAR_P (c) ? cmpchar_component (c, 0) : (c)); \ | 110 | COMPOSITE_CHAR_P (c) ? cmpchar_component (c, 0) : (c)); \ |
| 111 | temp; }) | 111 | temp; }) |
| 112 | #else | 112 | #else |
| 113 | #define CATEGORY_SET(c) \ | 113 | #define CATEGORY_SET(c) \ |
| 114 | Faref (current_buffer->category_table, \ | 114 | ((c) < CHAR_TABLE_ORDINARY_SLOTS \ |
| 115 | COMPOSITE_CHAR_P (c) ? cmpchar_component (c, 0) : (c)) | 115 | ? Faref (current_buffer->category_table, make_number ((unsigned char) c)) \ |
| 116 | : Faref (current_buffer->category_table, \ | ||
| 117 | COMPOSITE_CHAR_P (c) ? cmpchar_component ((c), 0) : (c)) | ||
| 116 | #endif | 118 | #endif |
| 117 | 119 | ||
| 118 | /* Return the doc string of CATEGORY in category table TABLE. */ | 120 | /* Return the doc string of CATEGORY in category table TABLE. */ |