diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/w32term.c | 2 | ||||
| -rw-r--r-- | src/w32term.h | 11 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 752dd4313f8..dfc2e730f8b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru> | 1 | 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 2 | ||
| 3 | Fix recently introduced crash on MS-Windows (Bug#12839). | ||
| 4 | * w32term.h (struct scroll_bar): Use convenient header. | ||
| 5 | (SCROLL_BAR_VEC_SIZE): Remove. | ||
| 6 | * w32term.c (x_scroll_bar_create): Use VECSIZE. | ||
| 7 | |||
| 8 | 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 9 | |||
| 3 | Tweak last vectorlike_header change. | 10 | Tweak last vectorlike_header change. |
| 4 | * alloc.c (struct Lisp_Vectorlike_Free): Special type to represent | 11 | * alloc.c (struct Lisp_Vectorlike_Free): Special type to represent |
| 5 | vectorlike object on the free list. This is introduced to avoid | 12 | vectorlike object on the free list. This is introduced to avoid |
diff --git a/src/w32term.c b/src/w32term.c index 4cc0b860947..b14a46bc01a 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -3626,7 +3626,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height) | |||
| 3626 | HWND hwnd; | 3626 | HWND hwnd; |
| 3627 | SCROLLINFO si; | 3627 | SCROLLINFO si; |
| 3628 | struct scroll_bar *bar | 3628 | struct scroll_bar *bar |
| 3629 | = XSCROLL_BAR (Fmake_vector (make_number (SCROLL_BAR_VEC_SIZE), Qnil)); | 3629 | = XSCROLL_BAR (Fmake_vector (make_number (VECSIZE (struct scroll_bar)), Qnil)); |
| 3630 | Lisp_Object barobj; | 3630 | Lisp_Object barobj; |
| 3631 | 3631 | ||
| 3632 | block_input (); | 3632 | block_input (); |
diff --git a/src/w32term.h b/src/w32term.h index af5b37a1171..72fb8a76e35 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -415,9 +415,8 @@ extern struct w32_output w32term_display; | |||
| 415 | 415 | ||
| 416 | struct scroll_bar { | 416 | struct scroll_bar { |
| 417 | 417 | ||
| 418 | /* These fields are shared by all vectors. */ | 418 | /* This field is shared by all vectors. */ |
| 419 | EMACS_INT size_from_Lisp_Vector_struct; | 419 | struct vectorlike_header header; |
| 420 | struct Lisp_Vector *next_from_Lisp_Vector_struct; | ||
| 421 | 420 | ||
| 422 | /* The window we're a scroll bar for. */ | 421 | /* The window we're a scroll bar for. */ |
| 423 | Lisp_Object window; | 422 | Lisp_Object window; |
| @@ -460,12 +459,6 @@ struct scroll_bar { | |||
| 460 | Lisp_Object fringe_extended_p; | 459 | Lisp_Object fringe_extended_p; |
| 461 | }; | 460 | }; |
| 462 | 461 | ||
| 463 | /* The number of elements a vector holding a struct scroll_bar needs. */ | ||
| 464 | #define SCROLL_BAR_VEC_SIZE \ | ||
| 465 | ((sizeof (struct scroll_bar) \ | ||
| 466 | - sizeof (EMACS_INT) - sizeof (struct Lisp_Vector *)) \ | ||
| 467 | / word_size) | ||
| 468 | |||
| 469 | /* Turning a lisp vector value into a pointer to a struct scroll_bar. */ | 462 | /* Turning a lisp vector value into a pointer to a struct scroll_bar. */ |
| 470 | #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec)) | 463 | #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec)) |
| 471 | 464 | ||