diff options
| author | Dmitry Antipov | 2012-08-08 14:23:04 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-08-08 14:23:04 +0400 |
| commit | ad8c997f72c95b7351eab4c8ea2ac8c667545e6f (patch) | |
| tree | 95f6da158be105a5a83a31c087764ce1d7eb7944 /src/intervals.c | |
| parent | ce0fcefa27728a4e83e10962075c388c8a6da87a (diff) | |
| download | emacs-ad8c997f72c95b7351eab4c8ea2ac8c667545e6f.tar.gz emacs-ad8c997f72c95b7351eab4c8ea2ac8c667545e6f.zip | |
Inline functions to examine and change string intervals.
* lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
(string_get_intervals, string_set_intervals): New function.
* alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
* lread.c, print.c, textprop.c: Adjust users.
Diffstat (limited to 'src/intervals.c')
| -rw-r--r-- | src/intervals.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/intervals.c b/src/intervals.c index 504557dadb7..64e54eb7b43 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -84,7 +84,7 @@ create_root_interval (Lisp_Object parent) | |||
| 84 | { | 84 | { |
| 85 | new->total_length = SCHARS (parent); | 85 | new->total_length = SCHARS (parent); |
| 86 | eassert (0 <= TOTAL_LENGTH (new)); | 86 | eassert (0 <= TOTAL_LENGTH (new)); |
| 87 | STRING_SET_INTERVALS (parent, new); | 87 | string_set_intervals (parent, new); |
| 88 | new->position = 0; | 88 | new->position = 0; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| @@ -455,7 +455,7 @@ balance_possible_root_interval (register INTERVAL interval) | |||
| 455 | if (BUFFERP (parent)) | 455 | if (BUFFERP (parent)) |
| 456 | BUF_INTERVALS (XBUFFER (parent)) = interval; | 456 | BUF_INTERVALS (XBUFFER (parent)) = interval; |
| 457 | else if (STRINGP (parent)) | 457 | else if (STRINGP (parent)) |
| 458 | STRING_SET_INTERVALS (parent, interval); | 458 | string_set_intervals (parent, interval); |
| 459 | } | 459 | } |
| 460 | 460 | ||
| 461 | return interval; | 461 | return interval; |
| @@ -1206,7 +1206,7 @@ delete_interval (register INTERVAL i) | |||
| 1206 | if (BUFFERP (owner)) | 1206 | if (BUFFERP (owner)) |
| 1207 | BUF_INTERVALS (XBUFFER (owner)) = parent; | 1207 | BUF_INTERVALS (XBUFFER (owner)) = parent; |
| 1208 | else if (STRINGP (owner)) | 1208 | else if (STRINGP (owner)) |
| 1209 | STRING_SET_INTERVALS (owner, parent); | 1209 | string_set_intervals (owner, parent); |
| 1210 | else | 1210 | else |
| 1211 | abort (); | 1211 | abort (); |
| 1212 | 1212 | ||
| @@ -2126,7 +2126,7 @@ get_property_and_range (ptrdiff_t pos, Lisp_Object prop, Lisp_Object *val, | |||
| 2126 | else if (BUFFERP (object)) | 2126 | else if (BUFFERP (object)) |
| 2127 | i = find_interval (BUF_INTERVALS (XBUFFER (object)), pos); | 2127 | i = find_interval (BUF_INTERVALS (XBUFFER (object)), pos); |
| 2128 | else if (STRINGP (object)) | 2128 | else if (STRINGP (object)) |
| 2129 | i = find_interval (STRING_INTERVALS (object), pos); | 2129 | i = find_interval (string_get_intervals (object), pos); |
| 2130 | else | 2130 | else |
| 2131 | abort (); | 2131 | abort (); |
| 2132 | 2132 | ||
| @@ -2259,7 +2259,7 @@ copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, | |||
| 2259 | return; | 2259 | return; |
| 2260 | 2260 | ||
| 2261 | interval_set_object (interval_copy, string); | 2261 | interval_set_object (interval_copy, string); |
| 2262 | STRING_SET_INTERVALS (string, interval_copy); | 2262 | string_set_intervals (string, interval_copy); |
| 2263 | } | 2263 | } |
| 2264 | 2264 | ||
| 2265 | /* Return 1 if strings S1 and S2 have identical properties; 0 otherwise. | 2265 | /* Return 1 if strings S1 and S2 have identical properties; 0 otherwise. |
| @@ -2272,8 +2272,8 @@ compare_string_intervals (Lisp_Object s1, Lisp_Object s2) | |||
| 2272 | ptrdiff_t pos = 0; | 2272 | ptrdiff_t pos = 0; |
| 2273 | ptrdiff_t end = SCHARS (s1); | 2273 | ptrdiff_t end = SCHARS (s1); |
| 2274 | 2274 | ||
| 2275 | i1 = find_interval (STRING_INTERVALS (s1), 0); | 2275 | i1 = find_interval (string_get_intervals (s1), 0); |
| 2276 | i2 = find_interval (STRING_INTERVALS (s2), 0); | 2276 | i2 = find_interval (string_get_intervals (s2), 0); |
| 2277 | 2277 | ||
| 2278 | while (pos < end) | 2278 | while (pos < end) |
| 2279 | { | 2279 | { |