changeset 37328:9a801971bd7e

(find_interval): Don't rebalance during signal handling.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 12 Apr 2001 12:13:19 +0000
parents 086b7dd058d9
children b3696bdf8335
files src/intervals.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/intervals.c	Wed Apr 11 21:53:10 2001 +0000
+++ b/src/intervals.c	Thu Apr 12 12:13:19 2001 +0000
@@ -612,7 +612,8 @@
   if (relative_position > TOTAL_LENGTH (tree))
     abort ();			/* Paranoia */
 
-  tree = balance_possible_root_interval (tree);
+  if (!handling_signal)
+    tree = balance_possible_root_interval (tree);
 
   while (1)
     {
@@ -720,7 +721,9 @@
 
 /* Find the interval containing POS given some non-NULL INTERVAL
    in the same tree.  Note that we need to update interval->position
-   if we go down the tree.  */
+   if we go down the tree.
+   To speed up the process, we assume that the ->position of
+   I and all its parents is already uptodate.  */
 INTERVAL
 update_interval (i, pos)
      register INTERVAL i;