From 0f8fe9a26f2f11b85b3577f47372a860c9a0d53a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 23 Nov 2004 05:05:34 +0000 Subject: [PATCH] (Fset_window_scroll_bars): Don't use XINT if it isn't int. (decode_next_window_args, window_loop): Don't use XFASTINT blindly. --- src/window.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/window.c b/src/window.c index 39fa03c2879..f7a7a4c438c 100644 --- a/src/window.c +++ b/src/window.c @@ -1611,7 +1611,7 @@ decode_next_window_args (window, minibuf, all_frames) : Qnil); else if (EQ (*all_frames, Qvisible)) ; - else if (XFASTINT (*all_frames) == 0) + else if (EQ (*all_frames, make_number (0))) ; else if (FRAMEP (*all_frames)) ; @@ -1885,7 +1885,7 @@ window_loop (type, obj, mini, frames) if (f) frame_arg = Qlambda; - else if (XFASTINT (frames) == 0) + else if (EQ (frames, make_number (0))) frame_arg = frames; else if (EQ (frames, Qvisible)) frame_arg = frames; @@ -6181,10 +6181,12 @@ If TYPE is t, use the frame's scroll-bar type. */) struct window *w = decode_window (window); if (!NILP (width)) - CHECK_NATNUM (width); + { + CHECK_NATNUM (width); - if (XINT (width) == 0) - vertical_type = Qnil; + if (XINT (width) == 0) + vertical_type = Qnil; + } if (!(EQ (vertical_type, Qnil) || EQ (vertical_type, Qleft) -- 2.39.2