Mercurial > hg > xemacs-beta
comparison src/fns.c @ 5360:46b53e84ea7a
#'substring-no-properties: check STRING's type, get_string_range_char won't.
src/ChangeLog addition:
2011-02-24 Aidan Kehoe <kehoea@parhasard.net>
* fns.c (Fsubstring_no_properties):
Sigh, get_string_range_char checks the type of its START and END
arguments, but doesn't check the type of its STRING
argument. Thank you Raymond Toy!
tests/ChangeLog addition:
2011-02-24 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el (substring-no-properties):
Make sure this function checks its arguments' types, the absence
of which was revealed by Raymond Toy's bug report of
http://mid.gmane.org/4D65D413.5050103@gmail.com .
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 24 Feb 2011 09:36:19 +0000 |
parents | f5a5501814f5 |
children | d967d96ca043 |
comparison
equal
deleted
inserted
replaced
5359:f5a5501814f5 | 5360:46b53e84ea7a |
---|---|
2093 { | 2093 { |
2094 Charcount ccstart, ccend; | 2094 Charcount ccstart, ccend; |
2095 Bytecount bstart, blen; | 2095 Bytecount bstart, blen; |
2096 Lisp_Object val; | 2096 Lisp_Object val; |
2097 | 2097 |
2098 CHECK_STRING (string); | |
2098 get_string_range_char (string, start, end, &ccstart, &ccend, | 2099 get_string_range_char (string, start, end, &ccstart, &ccend, |
2099 GB_HISTORICAL_STRING_BEHAVIOR); | 2100 GB_HISTORICAL_STRING_BEHAVIOR); |
2100 bstart = string_index_char_to_byte (string, ccstart); | 2101 bstart = string_index_char_to_byte (string, ccstart); |
2101 blen = string_offset_char_to_byte_len (string, bstart, ccend - ccstart); | 2102 blen = string_offset_char_to_byte_len (string, bstart, ccend - ccstart); |
2102 val = make_string (XSTRING_DATA (string) + bstart, blen); | 2103 val = make_string (XSTRING_DATA (string) + bstart, blen); |