diff src/data.c @ 21244:50929073a0ba

Use STRING_BYTES and SET_STRING_BYTES.
author Richard M. Stallman <rms@gnu.org>
date Sat, 21 Mar 1998 07:06:14 +0000
parents 6988880cc529
children 6e3839022c76
line wrap: on
line diff
--- a/src/data.c	Sat Mar 21 06:16:35 1998 +0000
+++ b/src/data.c	Sat Mar 21 07:06:14 1998 +0000
@@ -1648,7 +1648,7 @@
       idxval_byte = string_char_to_byte (array, idxval);
 
       c = STRING_CHAR (&XSTRING (array)->data[idxval_byte],
-		       XSTRING (array)->size_byte - idxval_byte);
+		       STRING_BYTES (XSTRING (array)) - idxval_byte);
       return make_number (c);
     }
   else if (BOOL_VECTOR_P (array))
@@ -1847,7 +1847,7 @@
       p = &XSTRING (array)->data[idxval_byte];
 
       actual_len
-	= MULTIBYTE_FORM_LENGTH (p, XSTRING (array)->size_byte - idxval_byte);
+	= MULTIBYTE_FORM_LENGTH (p, STRING_BYTES (XSTRING (array)) - idxval_byte);
       new_len = Fchar_bytes (newelt);
       if (actual_len != XINT (new_len))
 	error ("Attempt to change byte length of a string");