changeset 23129:1d223a4bf4de

(Faset): Use macro CHAR_BYTES instead of Fchar_bytes.
author Kenichi Handa <handa@m17n.org>
date Fri, 28 Aug 1998 12:22:39 +0000
parents 45de23c16505
children f2cee3bcef78
files src/data.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);