diff options
author | Kenichi Handa <handa@m17n.org> | 1998-08-28 12:22:39 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1998-08-28 12:22:39 +0000 |
commit | 6d0b4facd2fa9385ec9b332ebd78c41840f4075f (patch) | |
tree | feee9479652b584a6e2c37a6d31aa4ae0977dee2 /src/data.c | |
parent | cc531c444145b8b13f4520532e7ab36483e0e4cf (diff) | |
download | emacs-6d0b4facd2fa9385ec9b332ebd78c41840f4075f.tar.gz |
(Faset): Use macro CHAR_BYTES instead of Fchar_bytes.
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/data.c b/src/data.c index eb04f5a39aa..9d3955dd3a9 100644 --- a/src/data.c +++ b/src/data.c @@ -1847,8 +1847,7 @@ IDX starts at 0.") } 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 @@ IDX starts at 0.") 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); |