From: Ken Raeburn Date: Tue, 16 Jul 2002 16:37:40 +0000 (+0000) Subject: (FETCH_STRING_CHAR_ADVANCE, FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Use SBYTES X-Git-Tag: ttn-vms-21-2-B4~14074 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9f5348e3c86479224dd9f9217fa4a728e0083d36;p=emacs.git (FETCH_STRING_CHAR_ADVANCE, FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Use SBYTES instead of XSTRING()->size_byte. --- 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 \