aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn2002-07-16 17:37:31 +0000
committerKen Raeburn2002-07-16 17:37:31 +0000
commit943afcc71e544fba109e220a619b88f7232848af (patch)
tree776ba7f69847974546c2df3e6f5bbbad2dbf3ba3 /src
parent1e5d9116ccf34ff7bb6a9eb8a90e58e01ba69162 (diff)
downloademacs-943afcc71e544fba109e220a619b88f7232848af.tar.gz
emacs-943afcc71e544fba109e220a619b88f7232848af.zip
(validate_interval_range, interval_of): Use string macros instead of
Lisp_String fields.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/textprop.c14
2 files changed, 16 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d0cf9f06534..33a0281d922 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
12002-07-16 Ken Raeburn <raeburn@gnu.org> 12002-07-16 Ken Raeburn <raeburn@gnu.org>
2 2
3 * buffer.c (reset_buffer_local_variables): Delete "#if 0"
4 settings of non-existent fields.
5
6 * editfns.c (Fstring_to_char): Don't use XSTRING/XSETSTRING to
7 copy a lisp value.
8
9 * lread.c (Fintern_soft): Use string macros instead of
10 Lisp_String fields.
11 * textprop.c (validate_interval_range, interval_of): Likewise.
12
3 * fontset.c (Fset_fontset_font): Use SDATA instead of 13 * fontset.c (Fset_fontset_font): Use SDATA instead of
4 XSTRING()->data. 14 XSTRING()->data.
5 15
diff --git a/src/textprop.c b/src/textprop.c
index 62e9446426e..84479fc39e3 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -158,17 +158,17 @@ validate_interval_range (object, begin, end, force)
158 } 158 }
159 else 159 else
160 { 160 {
161 register struct Lisp_String *s = XSTRING (object); 161 int len = SCHARS (object);
162 162
163 if (! (0 <= XINT (*begin) && XINT (*begin) <= XINT (*end) 163 if (! (0 <= XINT (*begin) && XINT (*begin) <= XINT (*end)
164 && XINT (*end) <= s->size)) 164 && XINT (*end) <= len))
165 args_out_of_range (*begin, *end); 165 args_out_of_range (*begin, *end);
166 XSETFASTINT (*begin, XFASTINT (*begin)); 166 XSETFASTINT (*begin, XFASTINT (*begin));
167 if (begin != end) 167 if (begin != end)
168 XSETFASTINT (*end, XFASTINT (*end)); 168 XSETFASTINT (*end, XFASTINT (*end));
169 i = s->intervals; 169 i = STRING_INTERVALS (object);
170 170
171 if (s->size == 0) 171 if (len == 0)
172 return NULL_INTERVAL; 172 return NULL_INTERVAL;
173 173
174 searchpos = XINT (*begin); 174 searchpos = XINT (*begin);
@@ -553,11 +553,9 @@ interval_of (position, object)
553 } 553 }
554 else 554 else
555 { 555 {
556 register struct Lisp_String *s = XSTRING (object);
557
558 beg = 0; 556 beg = 0;
559 end = s->size; 557 end = SCHARS (object);
560 i = s->intervals; 558 i = STRING_INTERVALS (object);
561 } 559 }
562 560
563 if (!(beg <= position && position <= end)) 561 if (!(beg <= position && position <= end))