aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-11-15 23:52:43 +0000
committerKarl Heuer1994-11-15 23:52:43 +0000
commit34ca5317e2801ef5dc70095785134c7be9bc9d68 (patch)
treecc5f2d14632bcbb0aff708373cd44b55a2fbd4f2 /src
parentc1a2bfad02a83f1f957e507c81fe942a40ae0dcb (diff)
downloademacs-34ca5317e2801ef5dc70095785134c7be9bc9d68.tar.gz
emacs-34ca5317e2801ef5dc70095785134c7be9bc9d68.zip
(x_window_to_frame, x_any_window_to_frame, x_top_window_to_frame): Use the new
type-test macros.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/xfns.c b/src/xfns.c
index e9a65d44c9e..4d41c81b1cc 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -260,7 +260,7 @@ check_x_display_info (frame)
260/* Return the Emacs frame-object corresponding to an X window. 260/* Return the Emacs frame-object corresponding to an X window.
261 It could be the frame's main window or an icon window. */ 261 It could be the frame's main window or an icon window. */
262 262
263/* This function can be called during GC, so use XGCTYPE. */ 263/* This function can be called during GC, so use GC_xxx type test macros. */
264 264
265struct frame * 265struct frame *
266x_window_to_frame (wdesc) 266x_window_to_frame (wdesc)
@@ -269,11 +269,10 @@ x_window_to_frame (wdesc)
269 Lisp_Object tail, frame; 269 Lisp_Object tail, frame;
270 struct frame *f; 270 struct frame *f;
271 271
272 for (tail = Vframe_list; XGCTYPE (tail) == Lisp_Cons; 272 for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
273 tail = XCONS (tail)->cdr)
274 { 273 {
275 frame = XCONS (tail)->car; 274 frame = XCONS (tail)->car;
276 if (XGCTYPE (frame) != Lisp_Frame) 275 if (!GC_FRAMEP (frame))
277 continue; 276 continue;
278 f = XFRAME (frame); 277 f = XFRAME (frame);
279#ifdef USE_X_TOOLKIT 278#ifdef USE_X_TOOLKIT
@@ -304,11 +303,10 @@ x_any_window_to_frame (wdesc)
304 struct frame *f; 303 struct frame *f;
305 struct x_display *x; 304 struct x_display *x;
306 305
307 for (tail = Vframe_list; XGCTYPE (tail) == Lisp_Cons; 306 for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
308 tail = XCONS (tail)->cdr)
309 { 307 {
310 frame = XCONS (tail)->car; 308 frame = XCONS (tail)->car;
311 if (XGCTYPE (frame) != Lisp_Frame) 309 if (!GC_FRAMEP (frame))
312 continue; 310 continue;
313 f = XFRAME (frame); 311 f = XFRAME (frame);
314 if (f->display.nothing == 1) 312 if (f->display.nothing == 1)
@@ -337,11 +335,10 @@ x_top_window_to_frame (wdesc)
337 struct frame *f; 335 struct frame *f;
338 struct x_display *x; 336 struct x_display *x;
339 337
340 for (tail = Vframe_list; XGCTYPE (tail) == Lisp_Cons; 338 for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
341 tail = XCONS (tail)->cdr)
342 { 339 {
343 frame = XCONS (tail)->car; 340 frame = XCONS (tail)->car;
344 if (XGCTYPE (frame) != Lisp_Frame) 341 if (!GC_FRAMEP (frame))
345 continue; 342 continue;
346 f = XFRAME (frame); 343 f = XFRAME (frame);
347 if (f->display.nothing == 1) 344 if (f->display.nothing == 1)