Mercurial > emacs
diff src/coding.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 | d704dd953837 |
| children | 606fe1bb94e6 |
line wrap: on
line diff
--- a/src/coding.c Sat Mar 21 06:16:35 1998 +0000 +++ b/src/coding.c Sat Mar 21 07:06:14 1998 +0000 @@ -4283,7 +4283,8 @@ { int len; char *buf; - int from = 0, to = XSTRING (str)->size, to_byte = XSTRING (str)->size_byte; + int from = 0, to = XSTRING (str)->size; + int to_byte = STRING_BYTES (XSTRING (str)); struct gcpro gcpro1; Lisp_Object saved_coding_symbol = Qnil; int result; @@ -4359,7 +4360,7 @@ len = encoding_buffer_size (coding, to_byte - from); else len = decoding_buffer_size (coding, to_byte - from); - len += from + XSTRING (str)->size_byte - to_byte; + len += from + STRING_BYTES (XSTRING (str)) - to_byte; GCPRO1 (str); buf = get_conversion_buffer (len); UNGCPRO; @@ -4381,9 +4382,9 @@ } bcopy (XSTRING (str)->data + to_byte, buf + from + coding->produced, - XSTRING (str)->size_byte - to_byte); - - len = from + XSTRING (str)->size_byte - to_byte; + STRING_BYTES (XSTRING (str)) - to_byte); + + len = from + STRING_BYTES (XSTRING (str)) - to_byte; if (encodep) str = make_unibyte_string (buf, len + coding->produced); else @@ -4565,7 +4566,7 @@ CHECK_STRING (string, 0); return detect_coding_system (XSTRING (string)->data, - XSTRING (string)->size_byte, + STRING_BYTES (XSTRING (string)), !NILP (highest)); }
