* window.h (struct window): Change type of 'use_time' and
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 28 Jun 2012 11:11:48 +0000 (15:11 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Thu, 28 Jun 2012 11:11:48 +0000 (15:11 +0400)
'sequence_number' from Lisp_Object to int.
* frame.c (make_frame): Adjust users accordingly.
* print.c (print_object): Likewise.
* window.c (select_window, Fwindow_use_time, make_parent_window)
(make_window): Likewise.

src/ChangeLog
src/frame.c
src/print.c
src/window.c
src/window.h

index fd1f17b..7ebcd7b 100644 (file)
@@ -1,3 +1,12 @@
+2012-06-28  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * window.h (struct window): Change type of 'use_time' and
+       'sequence_number' from Lisp_Object to int.
+       * frame.c (make_frame): Adjust users accordingly.
+       * print.c (print_object): Likewise.
+       * window.c (select_window, Fwindow_use_time, make_parent_window)
+       (make_window): Likewise.
+
 2012-06-28  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
index b048327..f9a557f 100644 (file)
@@ -356,8 +356,7 @@ make_frame (int mini_p)
   f->selected_window = root_window;
   /* Make sure this window seems more recently used than
      a newly-created, never-selected window.  */
-  ++window_select_count;
-  XSETFASTINT (XWINDOW (f->selected_window)->use_time, window_select_count);
+  XWINDOW (f->selected_window)->use_time = ++window_select_count;
 
   return f;
 }
index 68b9c30..e123136 100644 (file)
@@ -1774,8 +1774,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
        {
          int len;
          strout ("#<window ", -1, -1, printcharfun);
-         len = sprintf (buf, "%"pI"d",
-                        XFASTINT (XWINDOW (obj)->sequence_number));
+         len = sprintf (buf, "%d", XWINDOW (obj)->sequence_number);
          strout (buf, len, len, printcharfun);
          if (!NILP (XWINDOW (obj)->buffer))
            {
index f640a54..55d6ac7 100644 (file)
@@ -331,8 +331,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
 
   if (NILP (norecord))
     {
-      ++window_select_count;
-      XSETFASTINT (w->use_time, window_select_count);
+      w->use_time = ++window_select_count;
       record_buffer (w->buffer);
     }
 
@@ -499,7 +498,7 @@ one.  The window with the lowest use time is the least recently
 selected one.  */)
   (Lisp_Object window)
 {
-  return decode_window (window)->use_time;
+  return make_number (decode_window (window)->use_time);
 }
 \f
 DEFUN ("window-total-height", Fwindow_total_height, Swindow_total_height, 0, 1, 0,
@@ -3250,8 +3249,7 @@ make_parent_window (Lisp_Object window, int horflag)
          sizeof (Lisp_Object) * VECSIZE (struct window));
   XSETWINDOW (parent, p);
 
-  ++sequence_number;
-  XSETFASTINT (p->sequence_number, sequence_number);
+  p->sequence_number = ++sequence_number;
 
   replace_window (window, parent, 1);
 
@@ -3290,9 +3288,6 @@ make_window (void)
   w->pointm = Fmake_marker ();
   XSETFASTINT (w->hscroll, 0);
   XSETFASTINT (w->min_hscroll, 0);
-  XSETFASTINT (w->use_time, 0);
-  ++sequence_number;
-  XSETFASTINT (w->sequence_number, sequence_number);
   XSETFASTINT (w->last_point, 0);
   w->vertical_scroll_bar_type = Qt;
   XSETFASTINT (w->window_end_pos, 0);
@@ -3303,6 +3298,7 @@ make_window (void)
   w->nrows_scale_factor = w->ncols_scale_factor = 1;
   w->phys_cursor_type = -1;
   w->phys_cursor_width = -1;
+  w->sequence_number = ++sequence_number;
 
   /* Reset window_list.  */
   Vwindow_list = Qnil;
index 0d3910c..996c966 100644 (file)
@@ -147,12 +147,6 @@ struct window
        the user has set, by set-window-hscroll for example.  */
     Lisp_Object min_hscroll;
 
-    /* Number saying how recently window was selected.  */
-    Lisp_Object use_time;
-
-    /* Unique number of window assigned when it was created.  */
-    Lisp_Object sequence_number;
-
     /* No permanent meaning; used by save-window-excursion's
        bookkeeping.  */
     Lisp_Object temslot;
@@ -254,6 +248,12 @@ struct window
     struct glyph_matrix *current_matrix;
     struct glyph_matrix *desired_matrix;
 
+    /* Number saying how recently window was selected.  */
+    int use_time;
+
+    /* Unique number of window assigned when it was created.  */
+    int sequence_number;
+
     /* Scaling factor for the glyph_matrix size calculation in this window.
        Used if window contains many small images or uses proportional fonts,
        as the normal  may yield a matrix which is too small.  */