# HG changeset patch # User Kenichi Handa # Date 904306959 0 # Node ID 1d223a4bf4ded98130d631129b4b9d2e0aca3b77 # Parent 45de23c16505c741ee6a47af55f0c6318c1cd477 (Faset): Use macro CHAR_BYTES instead of Fchar_bytes. diff -r 45de23c16505 -r 1d223a4bf4de src/data.c --- a/src/data.c Fri Aug 28 12:22:39 1998 +0000 +++ b/src/data.c Fri Aug 28 12:22:39 1998 +0000 @@ -1847,8 +1847,7 @@ } else if (STRING_MULTIBYTE (array)) { - Lisp_Object new_len; - int c, idxval_byte, actual_len; + int c, idxval_byte, new_len, actual_len; unsigned char *p, *str; if (idxval < 0 || idxval >= XSTRING (array)->size) @@ -1859,8 +1858,9 @@ actual_len = MULTIBYTE_FORM_LENGTH (p, STRING_BYTES (XSTRING (array)) - idxval_byte); - new_len = Fchar_bytes (newelt); - if (actual_len != XINT (new_len)) + CHECK_NUMBER (newelt, 2); + new_len = CHAR_BYTES (XINT (newelt)); + if (actual_len != new_len) error ("Attempt to change byte length of a string"); CHAR_STRING (XINT (newelt), p, str);