comparison src/fns.c @ 46374:5d419e7c527d

* fns.c (concat): Use STRING_SET_CHARS.
author Ken Raeburn <raeburn@raeburn.org>
date Mon, 15 Jul 2002 02:16:15 +0000
parents 40db0673e6f0
children 18cf1d2514d9
comparison
equal deleted inserted replaced
46373:d101e617707c 46374:5d419e7c527d
712 textprops[num_textprops].from = combined; 712 textprops[num_textprops].from = combined;
713 textprops[num_textprops++].to = toindex; 713 textprops[num_textprops++].to = toindex;
714 } 714 }
715 toindex_byte += thislen_byte; 715 toindex_byte += thislen_byte;
716 toindex += thisleni - combined; 716 toindex += thisleni - combined;
717 SCHARS (val) -= combined; 717 STRING_SET_CHARS (val, SCHARS (val) - combined);
718 } 718 }
719 /* Copy a single-byte string to a multibyte string. */ 719 /* Copy a single-byte string to a multibyte string. */
720 else if (STRINGP (this) && STRINGP (val)) 720 else if (STRINGP (this) && STRINGP (val))
721 { 721 {
722 if (! NULL_INTERVAL_P (STRING_INTERVALS (this))) 722 if (! NULL_INTERVAL_P (STRING_INTERVALS (this)))
802 SREF (val, toindex_byte++) = XINT (elt); 802 SREF (val, toindex_byte++) = XINT (elt);
803 if (some_multibyte 803 if (some_multibyte
804 && toindex_byte > 0 804 && toindex_byte > 0
805 && count_combining (SDATA (val), 805 && count_combining (SDATA (val),
806 toindex_byte, toindex_byte - 1)) 806 toindex_byte, toindex_byte - 1))
807 SCHARS (val)--; 807 STRING_SET_CHARS (val, SCHARS (val) - 1);
808 else 808 else
809 toindex++; 809 toindex++;
810 } 810 }
811 else 811 else
812 /* If we have any multibyte characters, 812 /* If we have any multibyte characters,