{
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;
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;
}
bcopy (XSTRING (str)->data + to_byte, buf + from + coding->produced,
- XSTRING (str)->size_byte - to_byte);
+ STRING_BYTES (XSTRING (str)) - to_byte);
- len = from + XSTRING (str)->size_byte - to_byte;
+ len = from + STRING_BYTES (XSTRING (str)) - to_byte;
if (encodep)
str = make_unibyte_string (buf, len + coding->produced);
else
CHECK_STRING (string, 0);
return detect_coding_system (XSTRING (string)->data,
- XSTRING (string)->size_byte,
+ STRING_BYTES (XSTRING (string)),
!NILP (highest));
}