# HG changeset patch # User Aidan Kehoe # Date 1270207883 -3600 # Node ID 039d9a7f2e6d1f1f52f2dea9d659ae95ed185db0 # Parent f283b08ff0c96fc18c90f7a8a21bd6be9a472023 Call init_string_ascii_begin() in #'sort*, #'fill, don't be clever. 2010-04-02 Aidan Kehoe * fns.c (FsortX, Ffill): Don't try to be clever with the ascii_begin string header slot in these function, just call init_string_ascii_begin(). diff -r f283b08ff0c9 -r 039d9a7f2e6d src/ChangeLog --- a/src/ChangeLog Fri Apr 02 12:21:02 2010 +0100 +++ b/src/ChangeLog Fri Apr 02 12:31:23 2010 +0100 @@ -1,3 +1,9 @@ +2010-04-02 Aidan Kehoe + + * fns.c (FsortX, Ffill): + Don't try to be clever with the ascii_begin string header slot in + these function, just call init_string_ascii_begin(). + 2010-04-02 Aidan Kehoe Avoid build failure, Apple's g++-4.0.1, Mac OS 10.4. diff -r f283b08ff0c9 -r 039d9a7f2e6d src/fns.c --- a/src/fns.c Fri Apr 02 12:21:02 2010 +0100 +++ b/src/fns.c Fri Apr 02 12:31:23 2010 +0100 @@ -2671,8 +2671,6 @@ else if (STRINGP (sequence)) { Ibyte *strdata = XSTRING_DATA (sequence); - Elemcount string_ascii_begin = 0; - Ichar ch; sequence_len = string_char_length (sequence); @@ -2686,24 +2684,10 @@ CHECK_LISP_WRITEABLE (sequence); for (i = 0; i < sequence_len; ++i) { - ch = XCHAR (sequence_carray[i]); - strdata += set_itext_ichar (strdata, ch); - - if (string_ascii_begin <= i) - { - if (byte_ascii_p (ch)) - { - string_ascii_begin = i; - } - else - { - string_ascii_begin = MAX_STRING_ASCII_BEGIN; - } - } + strdata += set_itext_ichar (strdata, XCHAR (sequence_carray[i])); } - XSET_STRING_ASCII_BEGIN (sequence, min (string_ascii_begin, - MAX_STRING_ASCII_BEGIN)); + init_string_ascii_begin (sequence); bump_string_modiff (sequence); sledgehammer_check_ascii_begin (sequence); } @@ -3836,10 +3820,7 @@ memcpy (p, item_buf, item_bytecount); *p = '\0'; - XSET_STRING_ASCII_BEGIN (sequence, - item_bytecount == 1 ? - min (new_bytecount, MAX_STRING_ASCII_BEGIN) : - 0); + init_string_ascii_begin (sequence); bump_string_modiff (sequence); sledgehammer_check_ascii_begin (sequence); }