emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110855: Fix recently introduced cras


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110855: Fix recently introduced crash on MS-Windows (Bug#12839).
Date: Fri, 09 Nov 2012 18:45:15 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110855
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Fri 2012-11-09 18:45:15 +0400
message:
  Fix recently introduced crash on MS-Windows (Bug#12839).
  * w32term.h (struct scroll_bar): Use convenient header.
  (SCROLL_BAR_VEC_SIZE): Remove.
  * w32term.c (x_scroll_bar_create): Use VECSIZE.
modified:
  src/ChangeLog
  src/w32term.c
  src/w32term.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-11-09 11:38:31 +0000
+++ b/src/ChangeLog     2012-11-09 14:45:15 +0000
@@ -1,5 +1,12 @@
 2012-11-09  Dmitry Antipov  <address@hidden>
 
+       Fix recently introduced crash on MS-Windows (Bug#12839).
+       * w32term.h (struct scroll_bar): Use convenient header.
+       (SCROLL_BAR_VEC_SIZE): Remove.
+       * w32term.c (x_scroll_bar_create): Use VECSIZE.
+
+2012-11-09  Dmitry Antipov  <address@hidden>
+
        Tweak last vectorlike_header change.
        * alloc.c (struct Lisp_Vectorlike_Free): Special type to represent
        vectorlike object on the free list.  This is introduced to avoid

=== modified file 'src/w32term.c'
--- a/src/w32term.c     2012-10-08 13:46:03 +0000
+++ b/src/w32term.c     2012-11-09 14:45:15 +0000
@@ -3626,7 +3626,7 @@
   HWND hwnd;
   SCROLLINFO si;
   struct scroll_bar *bar
-    = XSCROLL_BAR (Fmake_vector (make_number (SCROLL_BAR_VEC_SIZE), Qnil));
+    = XSCROLL_BAR (Fmake_vector (make_number (VECSIZE (struct scroll_bar)), 
Qnil));
   Lisp_Object barobj;
 
   block_input ();

=== modified file 'src/w32term.h'
--- a/src/w32term.h     2012-10-17 19:02:44 +0000
+++ b/src/w32term.h     2012-11-09 14:45:15 +0000
@@ -415,9 +415,8 @@
 
 struct scroll_bar {
 
-  /* These fields are shared by all vectors.  */
-  EMACS_INT size_from_Lisp_Vector_struct;
-  struct Lisp_Vector *next_from_Lisp_Vector_struct;
+  /* This field is shared by all vectors.  */
+  struct vectorlike_header header;
 
   /* The window we're a scroll bar for.  */
   Lisp_Object window;
@@ -460,12 +459,6 @@
   Lisp_Object fringe_extended_p;
 };
 
-/* The number of elements a vector holding a struct scroll_bar needs.  */
-#define SCROLL_BAR_VEC_SIZE                                    \
-  ((sizeof (struct scroll_bar)                                 \
-    - sizeof (EMACS_INT) - sizeof (struct Lisp_Vector *))      \
-   / word_size)
-
 /* Turning a lisp vector value into a pointer to a struct scroll_bar.  */
 #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]