From 9f5348e3c86479224dd9f9217fa4a728e0083d36 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 16 Jul 2002 16:37:40 +0000 Subject: [PATCH] (FETCH_STRING_CHAR_ADVANCE, FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Use SBYTES instead of XSTRING()->size_byte. --- src/ChangeLog | 7 +++++++ src/charset.h | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 29f28059f61..d0cf9f06534 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2002-07-16 Ken Raeburn + * fontset.c (Fset_fontset_font): Use SDATA instead of + XSTRING()->data. + + * charset.h (FETCH_STRING_CHAR_ADVANCE, + FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Use SBYTES instead of + XSTRING()->size_byte. + * lisp.h (SDATA, SREF): Produce rvalue. (SSET): New macro. * alloc.c (make_event_array): Use SSET for storing into a string. diff --git a/src/charset.h b/src/charset.h index d8d504b8283..c84d33ca89d 100644 --- a/src/charset.h +++ b/src/charset.h @@ -574,7 +574,7 @@ if (1) \ if (STRING_MULTIBYTE (STRING)) \ { \ unsigned char *ptr = SDATA (STRING) + BYTEIDX; \ - int space_left = XSTRING (STRING)->size_byte - BYTEIDX; \ + int space_left = SBYTES (STRING) - BYTEIDX; \ int actual_len; \ \ OUTPUT = STRING_CHAR_AND_LENGTH (ptr, space_left, actual_len); \ @@ -591,7 +591,7 @@ else if (1) \ { \ unsigned char *fetch_string_char_ptr = SDATA (STRING) + BYTEIDX; \ - int fetch_string_char_space_left = XSTRING (STRING)->size_byte - BYTEIDX; \ + int fetch_string_char_space_left = SBYTES (STRING) - BYTEIDX; \ int actual_len; \ \ OUTPUT \ -- 2.39.5