summaryrefslogtreecommitdiff
path: root/src/intervals.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-11-08 12:05:27 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-11-08 12:05:27 -0800
commit09db192c23bc7205341a075b41d101a7bdf786ed (patch)
treedbf77a06e084bcc7853156f294a9946c6f38c8ad /src/intervals.c
parent0edcba87d0297124b988fb5c22b20a0c6ac13af1 (diff)
downloademacs-09db192c23bc7205341a075b41d101a7bdf786ed.tar.gz
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.c19
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/>. */
#define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set))
-extern INTERVAL adjust_intervals_for_insertion (INTERVAL,
- EMACS_INT, EMACS_INT);
-extern void adjust_intervals_for_deletion (struct buffer *,
- EMACS_INT, EMACS_INT);
-
static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object);
static INTERVAL merge_interval_right (INTERVAL);
static INTERVAL reproduce_tree (INTERVAL, INTERVAL);
@@ -803,7 +798,7 @@ update_interval (register INTERVAL i, EMACS_INT pos)
and check the hungry bits of both. Then add the length going back up
to the root. */
-INTERVAL
+static INTERVAL
adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position,
EMACS_INT length)
{
@@ -864,7 +859,7 @@ adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position,
interval. Another possibility would be to create a new interval for
this text, and make it have the merged properties of both ends. */
-INTERVAL
+static INTERVAL
adjust_intervals_for_insertion (INTERVAL tree,
EMACS_INT position, EMACS_INT length)
{
@@ -1374,7 +1369,7 @@ interval_deletion_adjustment (register INTERVAL tree, register EMACS_INT from,
text. The deletion is effected at position START (which is a
buffer position, i.e. origin 1). */
-void
+static void
adjust_intervals_for_deletion (struct buffer *buffer,
EMACS_INT start, EMACS_INT length)
{
@@ -1430,7 +1425,7 @@ adjust_intervals_for_deletion (struct buffer *buffer,
compiler that does not allow calling a static function (here,
adjust_intervals_for_deletion) from a non-static inline function. */
-inline void
+void
offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length)
{
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
/* Set point in BUFFER "temporarily" to CHARPOS, which corresponds to
byte position BYTEPOS. */
-inline void
+void
temp_set_point_both (struct buffer *buffer,
EMACS_INT charpos, EMACS_INT bytepos)
{
@@ -1902,7 +1897,7 @@ temp_set_point_both (struct buffer *buffer,
/* Set point "temporarily", without checking any text properties. */
-inline void
+void
temp_set_point (struct buffer *buffer, EMACS_INT charpos)
{
temp_set_point_both (buffer, charpos,
@@ -2391,7 +2386,7 @@ copy_intervals (INTERVAL tree, EMACS_INT start, EMACS_INT length)
/* Give STRING the properties of BUFFER from POSITION to LENGTH. */
-inline void
+void
copy_intervals_to_string (Lisp_Object string, struct buffer *buffer,
EMACS_INT position, EMACS_INT length)
{