changeset 46448:218b99308569

(validate_interval_range, interval_of): Use string macros instead of Lisp_String fields.
author Ken Raeburn <raeburn@raeburn.org>
date Tue, 16 Jul 2002 17:37:14 +0000
parents 8e01c92219ab
children b554160f3810
files src/textprop.c
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/textprop.c	Tue Jul 16 17:35:50 2002 +0000
+++ b/src/textprop.c	Tue Jul 16 17:37:14 2002 +0000
@@ -158,17 +158,17 @@
     }
   else
     {
-      register struct Lisp_String *s = XSTRING (object);
+      int len = SCHARS (object);
 
       if (! (0 <= XINT (*begin) && XINT (*begin) <= XINT (*end)
-	     && XINT (*end) <= s->size))
+	     && XINT (*end) <= len))
 	args_out_of_range (*begin, *end);
       XSETFASTINT (*begin, XFASTINT (*begin));
       if (begin != end)
 	XSETFASTINT (*end, XFASTINT (*end));
-      i = s->intervals;
+      i = STRING_INTERVALS (object);
 
-      if (s->size == 0)
+      if (len == 0)
 	return NULL_INTERVAL;
 
       searchpos = XINT (*begin);
@@ -553,11 +553,9 @@
     }
   else
     {
-      register struct Lisp_String *s = XSTRING (object);
-
       beg = 0;
-      end = s->size;
-      i = s->intervals;
+      end = SCHARS (object);
+      i = STRING_INTERVALS (object);
     }
 
   if (!(beg <= position && position <= end))