diff options
| author | Paul Eggert | 2011-11-08 12:05:27 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-11-08 12:05:27 -0800 |
| commit | 09db192c23bc7205341a075b41d101a7bdf786ed (patch) | |
| tree | dbf77a06e084bcc7853156f294a9946c6f38c8ad /src/intervals.c | |
| parent | 0edcba87d0297124b988fb5c22b20a0c6ac13af1 (diff) | |
| download | emacs-09db192c23bc7205341a075b41d101a7bdf786ed.tar.gz emacs-09db192c23bc7205341a075b41d101a7bdf786ed.zip | |
Avoid some portability problems by eschewing 'extern inline' functions.
The trivial performance wins aren't worth the portability hassles; see
<http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
et seq.
* dispextern.h (window_box, window_box_height, window_text_bottom_y)
(window_box_width, window_box_left, window_box_left_offset)
(window_box_right, window_box_right_offset): Undo previous change,
by removing the "extern"s.
* intervals.c (adjust_intervals_for_insertion)
(adjust_intervals_for_deletion): Undo previous change,
making these static again.
(offset_intervals, temp_set_point_both, temp_set_point)
(copy_intervals_to_string): No longer inline.
* xdisp.c (window_text_bottom_y, window_box_width)
(window_box_height, window_box_left_offset)
(window_box_right_offset, window_box_left, window_box_right)
(window_box): No longer inline.
Diffstat (limited to 'src/intervals.c')
| -rw-r--r-- | src/intervals.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/intervals.c b/src/intervals.c index be1bdfb9056..a78c7f07f6c 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -52,11 +52,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 52 | 52 | ||
| 53 | #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) | 53 | #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) |
| 54 | 54 | ||
| 55 | extern INTERVAL adjust_intervals_for_insertion (INTERVAL, | ||
| 56 | EMACS_INT, EMACS_INT); | ||
| 57 | extern void adjust_intervals_for_deletion (struct buffer *, | ||
| 58 | EMACS_INT, EMACS_INT); | ||
| 59 | |||
| 60 | static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object); | 55 | static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object); |
| 61 | static INTERVAL merge_interval_right (INTERVAL); | 56 | static INTERVAL merge_interval_right (INTERVAL); |
| 62 | static INTERVAL reproduce_tree (INTERVAL, INTERVAL); | 57 | static INTERVAL reproduce_tree (INTERVAL, INTERVAL); |
| @@ -803,7 +798,7 @@ update_interval (register INTERVAL i, EMACS_INT pos) | |||
| 803 | and check the hungry bits of both. Then add the length going back up | 798 | and check the hungry bits of both. Then add the length going back up |
| 804 | to the root. */ | 799 | to the root. */ |
| 805 | 800 | ||
| 806 | INTERVAL | 801 | static INTERVAL |
| 807 | adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, | 802 | adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, |
| 808 | EMACS_INT length) | 803 | EMACS_INT length) |
| 809 | { | 804 | { |
| @@ -864,7 +859,7 @@ adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, | |||
| 864 | interval. Another possibility would be to create a new interval for | 859 | interval. Another possibility would be to create a new interval for |
| 865 | this text, and make it have the merged properties of both ends. */ | 860 | this text, and make it have the merged properties of both ends. */ |
| 866 | 861 | ||
| 867 | INTERVAL | 862 | static INTERVAL |
| 868 | adjust_intervals_for_insertion (INTERVAL tree, | 863 | adjust_intervals_for_insertion (INTERVAL tree, |
| 869 | EMACS_INT position, EMACS_INT length) | 864 | EMACS_INT position, EMACS_INT length) |
| 870 | { | 865 | { |
| @@ -1374,7 +1369,7 @@ interval_deletion_adjustment (register INTERVAL tree, register EMACS_INT from, | |||
| 1374 | text. The deletion is effected at position START (which is a | 1369 | text. The deletion is effected at position START (which is a |
| 1375 | buffer position, i.e. origin 1). */ | 1370 | buffer position, i.e. origin 1). */ |
| 1376 | 1371 | ||
| 1377 | void | 1372 | static void |
| 1378 | adjust_intervals_for_deletion (struct buffer *buffer, | 1373 | adjust_intervals_for_deletion (struct buffer *buffer, |
| 1379 | EMACS_INT start, EMACS_INT length) | 1374 | EMACS_INT start, EMACS_INT length) |
| 1380 | { | 1375 | { |
| @@ -1430,7 +1425,7 @@ adjust_intervals_for_deletion (struct buffer *buffer, | |||
| 1430 | compiler that does not allow calling a static function (here, | 1425 | compiler that does not allow calling a static function (here, |
| 1431 | adjust_intervals_for_deletion) from a non-static inline function. */ | 1426 | adjust_intervals_for_deletion) from a non-static inline function. */ |
| 1432 | 1427 | ||
| 1433 | inline void | 1428 | void |
| 1434 | offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) | 1429 | offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) |
| 1435 | { | 1430 | { |
| 1436 | if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) | 1431 | if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) |
| @@ -1882,7 +1877,7 @@ lookup_char_property (Lisp_Object plist, register Lisp_Object prop, int textprop | |||
| 1882 | /* Set point in BUFFER "temporarily" to CHARPOS, which corresponds to | 1877 | /* Set point in BUFFER "temporarily" to CHARPOS, which corresponds to |
| 1883 | byte position BYTEPOS. */ | 1878 | byte position BYTEPOS. */ |
| 1884 | 1879 | ||
| 1885 | inline void | 1880 | void |
| 1886 | temp_set_point_both (struct buffer *buffer, | 1881 | temp_set_point_both (struct buffer *buffer, |
| 1887 | EMACS_INT charpos, EMACS_INT bytepos) | 1882 | EMACS_INT charpos, EMACS_INT bytepos) |
| 1888 | { | 1883 | { |
| @@ -1902,7 +1897,7 @@ temp_set_point_both (struct buffer *buffer, | |||
| 1902 | 1897 | ||
| 1903 | /* Set point "temporarily", without checking any text properties. */ | 1898 | /* Set point "temporarily", without checking any text properties. */ |
| 1904 | 1899 | ||
| 1905 | inline void | 1900 | void |
| 1906 | temp_set_point (struct buffer *buffer, EMACS_INT charpos) | 1901 | temp_set_point (struct buffer *buffer, EMACS_INT charpos) |
| 1907 | { | 1902 | { |
| 1908 | temp_set_point_both (buffer, charpos, | 1903 | temp_set_point_both (buffer, charpos, |
| @@ -2391,7 +2386,7 @@ copy_intervals (INTERVAL tree, EMACS_INT start, EMACS_INT length) | |||
| 2391 | 2386 | ||
| 2392 | /* Give STRING the properties of BUFFER from POSITION to LENGTH. */ | 2387 | /* Give STRING the properties of BUFFER from POSITION to LENGTH. */ |
| 2393 | 2388 | ||
| 2394 | inline void | 2389 | void |
| 2395 | copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, | 2390 | copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, |
| 2396 | EMACS_INT position, EMACS_INT length) | 2391 | EMACS_INT position, EMACS_INT length) |
| 2397 | { | 2392 | { |