Commit 943afcc7 authored by Ken Raeburn's avatar Ken Raeburn

(validate_interval_range, interval_of): Use string macros instead of

Lisp_String fields.
parent 1e5d9116
2002-07-16 Ken Raeburn <raeburn@gnu.org>
* buffer.c (reset_buffer_local_variables): Delete "#if 0"
settings of non-existent fields.
* editfns.c (Fstring_to_char): Don't use XSTRING/XSETSTRING to
copy a lisp value.
* lread.c (Fintern_soft): Use string macros instead of
Lisp_String fields.
* textprop.c (validate_interval_range, interval_of): Likewise.
* fontset.c (Fset_fontset_font): Use SDATA instead of
XSTRING()->data.
......
......@@ -158,17 +158,17 @@ validate_interval_range (object, begin, end, force)
}
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 @@ interval_of (position, object)
}
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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment