Mercurial > emacs
changeset 90970:3371fc48749b
Replace uses of GC_* macros with the non-GC_ versions.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 29 Jun 2007 03:37:33 +0000 |
parents | 0848217e8e8a |
children | 2acda4a4ac92 |
files | src/ChangeLog src/alloc.c src/buffer.c src/buffer.h src/data.c src/fileio.c src/filelock.c src/fns.c src/frame.h src/macterm.c src/print.c src/process.c src/w32fns.c src/w32menu.c src/w32term.c src/xfns.c src/xmenu.c src/xterm.c |
diffstat | 18 files changed, 140 insertions(+), 115 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Jun 26 12:02:59 2007 +0000 +++ b/src/ChangeLog Fri Jun 29 03:37:33 2007 +0000 @@ -1,3 +1,35 @@ +2007-06-29 Stefan Monnier <monnier@iro.umontreal.ca> + + * lisp.h (XGCTYPE, GC_HASH_TABLE_P, GC_NILP, GC_NUMBERP, GC_NATNUMP) + (GC_INTEGERP, GC_SYMBOLP, GC_MISCP, GC_VECTORLIKEP, GC_STRINGP) + (GC_CONSP, GC_FLOATP, GC_VECTORP, GC_OVERLAYP, GC_MARKERP) + (GC_INTFWDP, GC_BOOLFWDP, GC_OBJFWDP, GC_BUFFER_OBJFWDP) + (GC_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP) + (GC_KBOARD_OBJFWDP, GC_PSEUDOVECTORP, GC_WINDOW_CONFIGURATIONP) + (GC_PROCESSP, GC_WINDOWP, GC_SUBRP, GC_COMPILEDP, GC_BUFFERP) + (GC_SUB_CHAR_TABLE_P, GC_CHAR_TABLE_P, GC_BOOL_VECTOR_P, GC_FRAMEP) + (GC_EQ): Remove since they've been identical to their non-GC_ + alter-egos ever since the markbit was eradicated. + + * src/alloc.c: + * src/buffer.c: + * src/buffer.h: + * src/data.c: + * src/fileio.c: + * src/filelock.c: + * src/fns.c: + * src/frame.h: + * src/lisp.h: + * src/macterm.c: + * src/print.c: + * src/process.c: + * src/w32fns.c: + * src/w32menu.c: + * src/w32term.c: + * src/xfns.c: + * src/xmenu.c: + * src/xterm.c: Replace uses of GC_* macros with the non-GC_ versions. + 2007-06-16 Eli Zaretskii <eliz@gnu.org> * w32menu.c (add_menu_item): Escape `&' characters in menu items
--- a/src/alloc.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/alloc.c Fri Jun 29 03:37:33 2007 +0000 @@ -4160,7 +4160,7 @@ { int mark_p = 0; - switch (XGCTYPE (obj)) + switch (XTYPE (obj)) { case Lisp_String: mark_p = (live_string_p (m, po) @@ -4180,13 +4180,13 @@ break; case Lisp_Vectorlike: - /* Note: can't check GC_BUFFERP before we know it's a + /* Note: can't check BUFFERP before we know it's a buffer because checking that dereferences the pointer PO which might point anywhere. */ if (live_vector_p (m, po)) - mark_p = !GC_SUBRP (obj) && !VECTOR_MARKED_P (XVECTOR (obj)); + mark_p = !SUBRP (obj) && !VECTOR_MARKED_P (XVECTOR (obj)); else if (live_buffer_p (m, po)) - mark_p = GC_BUFFERP (obj) && !VECTOR_MARKED_P (XBUFFER (obj)); + mark_p = BUFFERP (obj) && !VECTOR_MARKED_P (XBUFFER (obj)); break; case Lisp_Misc: @@ -4276,7 +4276,7 @@ { Lisp_Object tem; XSETVECTOR (tem, p); - if (!GC_SUBRP (tem) && !VECTOR_MARKED_P (XVECTOR (tem))) + if (!SUBRP (tem) && !VECTOR_MARKED_P (XVECTOR (tem))) obj = tem; } break; @@ -4285,7 +4285,7 @@ abort (); } - if (!GC_NILP (obj)) + if (!NILP (obj)) mark_object (obj); } } @@ -5188,8 +5188,8 @@ prev = Qnil; while (CONSP (tail)) { - if (GC_CONSP (XCAR (tail)) - && GC_MARKERP (XCAR (XCAR (tail))) + if (CONSP (XCAR (tail)) + && MARKERP (XCAR (XCAR (tail))) && !XMARKER (XCAR (XCAR (tail)))->gcmarkbit) { if (NILP (prev)) @@ -5338,7 +5338,7 @@ struct glyph *end_glyph = glyph + row->used[area]; for (; glyph < end_glyph; ++glyph) - if (GC_STRINGP (glyph->object) + if (STRINGP (glyph->object) && !STRING_MARKED_P (XSTRING (glyph->object))) mark_object (glyph->object); } @@ -5471,7 +5471,7 @@ #endif /* not GC_CHECK_MARKED_OBJECTS */ - switch (SWITCH_ENUM_CAST (XGCTYPE (obj))) + switch (SWITCH_ENUM_CAST (XTYPE (obj))) { case Lisp_String: { @@ -5490,13 +5490,13 @@ case Lisp_Vectorlike: #ifdef GC_CHECK_MARKED_OBJECTS m = mem_find (po); - if (m == MEM_NIL && !GC_SUBRP (obj) + if (m == MEM_NIL && !SUBRP (obj) && po != &buffer_defaults && po != &buffer_local_symbols) abort (); #endif /* GC_CHECK_MARKED_OBJECTS */ - if (GC_BUFFERP (obj)) + if (BUFFERP (obj)) { if (!VECTOR_MARKED_P (XBUFFER (obj))) { @@ -5513,9 +5513,9 @@ mark_buffer (obj); } } - else if (GC_SUBRP (obj)) + else if (SUBRP (obj)) break; - else if (GC_COMPILEDP (obj)) + else if (COMPILEDP (obj)) /* We could treat this just like a vector, but it is better to save the COMPILED_CONSTANTS element for last and avoid recursion there. */ @@ -5538,7 +5538,7 @@ obj = ptr->contents[COMPILED_CONSTANTS]; goto loop; } - else if (GC_FRAMEP (obj)) + else if (FRAMEP (obj)) { register struct frame *ptr = XFRAME (obj); @@ -5570,7 +5570,7 @@ mark_object (ptr->current_tool_bar_string); #endif /* HAVE_WINDOW_SYSTEM */ } - else if (GC_BOOL_VECTOR_P (obj)) + else if (BOOL_VECTOR_P (obj)) { register struct Lisp_Vector *ptr = XVECTOR (obj); @@ -5579,7 +5579,7 @@ CHECK_LIVE (live_vector_p); VECTOR_MARK (ptr); /* Else mark it */ } - else if (GC_WINDOWP (obj)) + else if (WINDOWP (obj)) { register struct Lisp_Vector *ptr = XVECTOR (obj); struct window *w = XWINDOW (obj); @@ -5611,7 +5611,7 @@ mark_glyph_matrix (w->desired_matrix); } } - else if (GC_HASH_TABLE_P (obj)) + else if (HASH_TABLE_P (obj)) { struct Lisp_Hash_Table *h = XHASH_TABLE (obj); @@ -5640,7 +5640,7 @@ /* If hash table is not weak, mark all keys and values. For weak tables, mark only the vector. */ - if (GC_NILP (h->weak)) + if (NILP (h->weak)) mark_object (h->key_and_value); else VECTOR_MARK (XVECTOR (h->key_and_value)); @@ -5864,7 +5864,7 @@ { int survives_p; - switch (XGCTYPE (obj)) + switch (XTYPE (obj)) { case Lisp_Int: survives_p = 1; @@ -5883,7 +5883,7 @@ break; case Lisp_Vectorlike: - survives_p = GC_SUBRP (obj) || VECTOR_MARKED_P (XVECTOR (obj)); + survives_p = SUBRP (obj) || VECTOR_MARKED_P (XVECTOR (obj)); break; case Lisp_Cons:
--- a/src/buffer.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/buffer.c Fri Jun 29 03:37:33 2007 +0000 @@ -2867,7 +2867,7 @@ int endpos; XSETMISC (overlay ,tail); - if (!GC_OVERLAYP (overlay)) + if (!OVERLAYP (overlay)) abort (); endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); @@ -2882,7 +2882,7 @@ int startpos; XSETMISC (overlay, tail); - if (!GC_OVERLAYP (overlay)) + if (!OVERLAYP (overlay)) abort (); startpos = OVERLAY_POSITION (OVERLAY_START (overlay));
--- a/src/buffer.h Tue Jun 26 12:02:59 2007 +0000 +++ b/src/buffer.h Fri Jun 29 03:37:33 2007 +0000 @@ -919,7 +919,7 @@ We assume you know which buffer it's pointing into. */ #define OVERLAY_POSITION(P) \ - (GC_MARKERP (P) ? marker_position (P) : (abort (), 0)) + (MARKERP (P) ? marker_position (P) : (abort (), 0)) /***********************************************************************
--- a/src/data.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/data.c Fri Jun 29 03:37:33 2007 +0000 @@ -115,7 +115,7 @@ { /* If VALUE is not even a valid Lisp object, abort here where we can get a backtrace showing where it came from. */ - if ((unsigned int) XGCTYPE (value) >= Lisp_Type_Limit) + if ((unsigned int) XTYPE (value) >= Lisp_Type_Limit) abort (); xsignal2 (Qwrong_type_argument, predicate, value); @@ -187,7 +187,7 @@ (object) Lisp_Object object; { - switch (XGCTYPE (object)) + switch (XTYPE (object)) { case Lisp_Int: return Qinteger; @@ -214,25 +214,25 @@ abort (); case Lisp_Vectorlike: - if (GC_WINDOW_CONFIGURATIONP (object)) + if (WINDOW_CONFIGURATIONP (object)) return Qwindow_configuration; - if (GC_PROCESSP (object)) + if (PROCESSP (object)) return Qprocess; - if (GC_WINDOWP (object)) + if (WINDOWP (object)) return Qwindow; - if (GC_SUBRP (object)) + if (SUBRP (object)) return Qsubr; - if (GC_COMPILEDP (object)) + if (COMPILEDP (object)) return Qcompiled_function; - if (GC_BUFFERP (object)) + if (BUFFERP (object)) return Qbuffer; - if (GC_CHAR_TABLE_P (object)) + if (CHAR_TABLE_P (object)) return Qchar_table; - if (GC_BOOL_VECTOR_P (object)) + if (BOOL_VECTOR_P (object)) return Qbool_vector; - if (GC_FRAMEP (object)) + if (FRAMEP (object)) return Qframe; - if (GC_HASH_TABLE_P (object)) + if (HASH_TABLE_P (object)) return Qhash_table; return Qvector;
--- a/src/fileio.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/fileio.c Fri Jun 29 03:37:33 2007 +0000 @@ -5843,7 +5843,7 @@ couldn't handle some ange-ftp'd file. */ for (do_handled_files = 0; do_handled_files < 2; do_handled_files++) - for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) { buf = XCDR (XCAR (tail)); b = XBUFFER (buf);
--- a/src/filelock.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/filelock.c Fri Jun 29 03:37:33 2007 +0000 @@ -666,7 +666,7 @@ register Lisp_Object tail; register struct buffer *b; - for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) { b = XBUFFER (XCDR (XCAR (tail))); if (STRINGP (b->file_truename) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
--- a/src/fns.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/fns.c Fri Jun 29 03:37:33 2007 +0000 @@ -3831,7 +3831,7 @@ struct Lisp_Hash_Table *h; Lisp_Object key; { - unsigned hash = XUINT (key) ^ XGCTYPE (key); + unsigned hash = XUINT (key) ^ XTYPE (key); xassert ((hash & ~INTMASK) == 0); return hash; } @@ -3850,7 +3850,7 @@ if (FLOATP (key)) hash = sxhash (key, 0); else - hash = XUINT (key) ^ XGCTYPE (key); + hash = XUINT (key) ^ XTYPE (key); xassert ((hash & ~INTMASK) == 0); return hash; } @@ -4271,7 +4271,7 @@ /* Follow collision chain, removing entries that don't survive this garbage collection. */ prev = Qnil; - for (idx = HASH_INDEX (h, bucket); !GC_NILP (idx); idx = next) + for (idx = HASH_INDEX (h, bucket); !NILP (idx); idx = next) { int i = XFASTINT (idx); int key_known_to_survive_p = survives_gc_p (HASH_KEY (h, i)); @@ -4296,7 +4296,7 @@ if (remove_p) { /* Take out of collision chain. */ - if (GC_NILP (prev)) + if (NILP (prev)) HASH_INDEX (h, bucket) = next; else HASH_NEXT (h, XFASTINT (prev)) = next; @@ -4360,7 +4360,7 @@ do { marked = 0; - for (table = Vweak_hash_tables; !GC_NILP (table); table = h->next_weak) + for (table = Vweak_hash_tables; !NILP (table); table = h->next_weak) { h = XHASH_TABLE (table); if (h->size & ARRAY_MARK_FLAG) @@ -4370,7 +4370,7 @@ while (marked); /* Remove tables and entries that aren't used. */ - for (table = Vweak_hash_tables, used = Qnil; !GC_NILP (table); table = next) + for (table = Vweak_hash_tables, used = Qnil; !NILP (table); table = next) { h = XHASH_TABLE (table); next = h->next_weak;
--- a/src/frame.h Tue Jun 26 12:02:59 2007 +0000 +++ b/src/frame.h Fri Jun 29 03:37:33 2007 +0000 @@ -498,7 +498,7 @@ typedef struct frame *FRAME_PTR; -#define XFRAME(p) (eassert (GC_FRAMEP(p)),(struct frame *) XPNTR (p)) +#define XFRAME(p) (eassert (FRAMEP(p)),(struct frame *) XPNTR (p)) #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME)) /* Given a window, return its frame as a Lisp_Object. */
--- a/src/macterm.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/macterm.c Fri Jun 29 03:37:33 2007 +0000 @@ -3069,8 +3069,8 @@ /* Look for a frame with that top-level widget. Allocate the color on that frame to get the right gamma correction value. */ - for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) - if (GC_FRAMEP (XCAR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + if (FRAMEP (XCAR (tail)) && (f = XFRAME (XCAR (tail)), (f->output_data.nothing != 1 && FRAME_X_DISPLAY_INFO (f) == dpyinfo)) @@ -4402,9 +4402,9 @@ /* Don't stop displaying the initial startup message for a switch-frame event we don't need. */ - if (GC_NILP (Vterminal_frame) - && GC_CONSP (Vframe_list) - && !GC_NILP (XCDR (Vframe_list))) + if (NILP (Vterminal_frame) + && CONSP (Vframe_list) + && !NILP (XCDR (Vframe_list))) { bufp->kind = FOCUS_IN_EVENT; XSETFRAME (bufp->frame_or_window, frame); @@ -4477,7 +4477,7 @@ if (dpyinfo->x_focus_frame) { dpyinfo->x_highlight_frame - = ((GC_FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame))) + = ((FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame))) ? XFRAME (FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame)) : dpyinfo->x_focus_frame); if (! FRAME_LIVE_P (dpyinfo->x_highlight_frame)) @@ -5507,7 +5507,7 @@ { int win_y, top_range; - if (! GC_WINDOWP (bar->window)) + if (! WINDOWP (bar->window)) abort (); bufp->kind = SCROLL_BAR_CLICK_EVENT; @@ -5582,7 +5582,7 @@ XSETVECTOR (last_mouse_scroll_bar, bar); /* If we're dragging the bar, display it. */ - if (! GC_NILP (bar->dragging)) + if (! NILP (bar->dragging)) { /* Where should the handle be now? */ int new_start = y_pos - 24;
--- a/src/print.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/print.c Fri Jun 29 03:37:33 2007 +0000 @@ -1425,7 +1425,7 @@ print_number_index++; } - switch (XGCTYPE (obj)) + switch (XTYPE (obj)) { case Lisp_String: /* A string may have text properties, which can be circular. */ @@ -1626,7 +1626,7 @@ } #endif /* MAX_PRINT_CHARS */ - switch (XGCTYPE (obj)) + switch (XTYPE (obj)) { case Lisp_Int: if (sizeof (int) == sizeof (EMACS_INT))
--- a/src/process.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/process.c Fri Jun 29 03:37:33 2007 +0000 @@ -176,8 +176,8 @@ Qt nor Qnil but is instead a property list (KEY VAL ...). */ #ifdef HAVE_SOCKETS -#define NETCONN_P(p) (GC_CONSP (XPROCESS (p)->childp)) -#define NETCONN1_P(p) (GC_CONSP ((p)->childp)) +#define NETCONN_P(p) (CONSP (XPROCESS (p)->childp)) +#define NETCONN1_P(p) (CONSP ((p)->childp)) #else #define NETCONN_P(p) 0 #define NETCONN1_P(p) 0 @@ -6372,10 +6372,10 @@ { Lisp_Object tail, proc; - for (tail = Vprocess_alist; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) { proc = XCDR (XCAR (tail)); - if (GC_PROCESSP (proc) + if (PROCESSP (proc) && (NILP (buffer) || EQ (XPROCESS (proc)->buffer, buffer))) { if (NETCONN_P (proc)) @@ -6470,11 +6470,11 @@ /* Find the process that signaled us, and record its status. */ /* The process can have been deleted by Fdelete_process. */ - for (tail = deleted_pid_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = deleted_pid_list; CONSP (tail); tail = XCDR (tail)) { Lisp_Object xpid = XCAR (tail); - if ((GC_INTEGERP (xpid) && pid == (pid_t) XINT (xpid)) - || (GC_FLOATP (xpid) && pid == (pid_t) XFLOAT_DATA (xpid))) + if ((INTEGERP (xpid) && pid == (pid_t) XINT (xpid)) + || (FLOATP (xpid) && pid == (pid_t) XFLOAT_DATA (xpid))) { XSETCAR (tail, Qnil); goto sigchld_end_of_loop; @@ -6483,11 +6483,11 @@ /* Otherwise, if it is asynchronous, it is in Vprocess_alist. */ p = 0; - for (tail = Vprocess_alist; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) { proc = XCDR (XCAR (tail)); p = XPROCESS (proc); - if (GC_EQ (p->childp, Qt) && p->pid == pid) + if (EQ (p->childp, Qt) && p->pid == pid) break; p = 0; } @@ -6495,7 +6495,7 @@ /* Look for an asynchronous process whose pid hasn't been filled in yet. */ if (p == 0) - for (tail = Vprocess_alist; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) { proc = XCDR (XCAR (tail)); p = XPROCESS (proc);
--- a/src/w32fns.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/w32fns.c Fri Jun 29 03:37:33 2007 +0000 @@ -386,10 +386,10 @@ Lisp_Object tail, frame; struct frame *f; - for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); - if (!GC_FRAMEP (frame)) + if (!FRAMEP (frame)) continue; f = XFRAME (frame); if (!FRAME_W32_P (f) || FRAME_W32_DISPLAY_INFO (f) != dpyinfo) @@ -2466,8 +2466,8 @@ { Lisp_Object keylist; - /* Use GC_CONSP, since we are called asynchronously. */ - for (keylist = w32_grabbed_keys; GC_CONSP (keylist); keylist = XCDR (keylist)) + /* Use CONSP, since we are called asynchronously. */ + for (keylist = w32_grabbed_keys; CONSP (keylist); keylist = XCDR (keylist)) { Lisp_Object key = XCAR (keylist); @@ -2486,8 +2486,7 @@ { Lisp_Object keylist; - /* Use GC_CONSP, since we are called asynchronously. */ - for (keylist = w32_grabbed_keys; GC_CONSP (keylist); keylist = XCDR (keylist)) + for (keylist = w32_grabbed_keys; CONSP (keylist); keylist = XCDR (keylist)) { Lisp_Object key = XCAR (keylist);
--- a/src/w32menu.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/w32menu.c Fri Jun 29 03:37:33 2007 +0000 @@ -259,10 +259,10 @@ Lisp_Object tail, frame; FRAME_PTR f; - for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); - if (!GC_FRAMEP (frame)) + if (!FRAMEP (frame)) continue; f = XFRAME (frame); if (!FRAME_WINDOW_P (f))
--- a/src/w32term.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/w32term.c Fri Jun 29 03:37:33 2007 +0000 @@ -3316,9 +3316,9 @@ /* Don't stop displaying the initial startup message for a switch-frame event we don't need. */ - if (GC_NILP (Vterminal_frame) - && GC_CONSP (Vframe_list) - && !GC_NILP (XCDR (Vframe_list))) + if (NILP (Vterminal_frame) + && CONSP (Vframe_list) + && !NILP (XCDR (Vframe_list))) { bufp->kind = FOCUS_IN_EVENT; XSETFRAME (bufp->frame_or_window, frame); @@ -3404,7 +3404,7 @@ if (dpyinfo->w32_focus_frame) { dpyinfo->x_highlight_frame - = ((GC_FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->w32_focus_frame))) + = ((FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->w32_focus_frame))) ? XFRAME (FRAME_FOCUS_FRAME (dpyinfo->w32_focus_frame)) : dpyinfo->w32_focus_frame); if (! FRAME_LIVE_P (dpyinfo->x_highlight_frame)) @@ -3872,15 +3872,13 @@ { Lisp_Object tail; - for (tail = Vframe_list; - XGCTYPE (tail) == Lisp_Cons; - tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { Lisp_Object frame, bar, condemned; frame = XCAR (tail); /* All elements of Vframe_list should be frames. */ - if (! GC_FRAMEP (frame)) + if (! FRAMEP (frame)) abort (); /* Scan this frame's scroll bar list for a scroll bar with the @@ -3889,9 +3887,9 @@ for (bar = FRAME_SCROLL_BARS (XFRAME (frame)); /* This trick allows us to search both the ordinary and condemned scroll bar lists with one loop. */ - ! GC_NILP (bar) || (bar = condemned, + ! NILP (bar) || (bar = condemned, condemned = Qnil, - ! GC_NILP (bar)); + ! NILP (bar)); bar = XSCROLL_BAR (bar)->next) if (SCROLL_BAR_W32_WINDOW (XSCROLL_BAR (bar)) == window_id) return XSCROLL_BAR (bar); @@ -4363,7 +4361,7 @@ W32Msg *msg; struct input_event *emacs_event; { - if (! GC_WINDOWP (bar->window)) + if (! WINDOWP (bar->window)) abort (); emacs_event->kind = W32_SCROLL_BAR_CLICK_EVENT;
--- a/src/xfns.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/xfns.c Fri Jun 29 03:37:33 2007 +0000 @@ -308,10 +308,10 @@ if (wdesc == None) return 0; - for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); - if (!GC_FRAMEP (frame)) + if (!FRAMEP (frame)) continue; f = XFRAME (frame); if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) @@ -360,10 +360,10 @@ if (wdesc == None) return NULL; found = NULL; - for (tail = Vframe_list; GC_CONSP (tail) && !found; tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail) && !found; tail = XCDR (tail)) { frame = XCAR (tail); - if (!GC_FRAMEP (frame)) + if (!FRAMEP (frame)) continue; f = XFRAME (frame); @@ -415,10 +415,10 @@ if (wdesc == None) return 0; - for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); - if (!GC_FRAMEP (frame)) + if (!FRAMEP (frame)) continue; f = XFRAME (frame); if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) @@ -463,10 +463,10 @@ if (wdesc == None) return 0; - for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); - if (!GC_FRAMEP (frame)) + if (!FRAMEP (frame)) continue; f = XFRAME (frame); if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) @@ -510,10 +510,10 @@ if (wdesc == None) return 0; - for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); - if (!GC_FRAMEP (frame)) + if (!FRAMEP (frame)) continue; f = XFRAME (frame); if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
--- a/src/xmenu.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/xmenu.c Fri Jun 29 03:37:33 2007 +0000 @@ -248,10 +248,10 @@ Lisp_Object tail, frame; FRAME_PTR f; - for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); - if (!GC_FRAMEP (frame)) + if (!FRAMEP (frame)) continue; f = XFRAME (frame); if (!FRAME_WINDOW_P (f)) @@ -1556,10 +1556,10 @@ xt_or_gtk_widget frame_widget = XtParent (widget); Lisp_Object tail; - for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { frame = XCAR (tail); - if (GC_FRAMEP (frame) + if (FRAMEP (frame) && (f = XFRAME (frame), FRAME_X_P (f) && f->output_data.x->widget == frame_widget)) break;
--- a/src/xterm.c Tue Jun 26 12:02:59 2007 +0000 +++ b/src/xterm.c Fri Jun 29 03:37:33 2007 +0000 @@ -1562,8 +1562,8 @@ /* Look for a frame with that top-level widget. Allocate the color on that frame to get the right gamma correction value. */ - for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) - if (GC_FRAMEP (XCAR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + if (FRAMEP (XCAR (tail)) && (f = XFRAME (XCAR (tail)), (f->output_data.nothing != 1 && FRAME_X_DISPLAY_INFO (f) == dpyinfo)) @@ -3473,9 +3473,9 @@ /* Don't stop displaying the initial startup message for a switch-frame event we don't need. */ - if (GC_NILP (Vterminal_frame) - && GC_CONSP (Vframe_list) - && !GC_NILP (XCDR (Vframe_list))) + if (NILP (Vterminal_frame) + && CONSP (Vframe_list) + && !NILP (XCDR (Vframe_list))) { bufp->kind = FOCUS_IN_EVENT; XSETFRAME (bufp->frame_or_window, frame); @@ -3585,7 +3585,7 @@ if (dpyinfo->x_focus_frame) { dpyinfo->x_highlight_frame - = ((GC_FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame))) + = ((FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame))) ? XFRAME (FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame)) : dpyinfo->x_focus_frame); if (! FRAME_LIVE_P (dpyinfo->x_highlight_frame)) @@ -4130,15 +4130,13 @@ window_id = (Window) xg_get_scroll_id_for_window (display, window_id); #endif /* USE_GTK && USE_TOOLKIT_SCROLL_BARS */ - for (tail = Vframe_list; - XGCTYPE (tail) == Lisp_Cons; - tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { Lisp_Object frame, bar, condemned; frame = XCAR (tail); /* All elements of Vframe_list should be frames. */ - if (! GC_FRAMEP (frame)) + if (! FRAMEP (frame)) abort (); /* Scan this frame's scroll bar list for a scroll bar with the @@ -4147,9 +4145,9 @@ for (bar = FRAME_SCROLL_BARS (XFRAME (frame)); /* This trick allows us to search both the ordinary and condemned scroll bar lists with one loop. */ - ! GC_NILP (bar) || (bar = condemned, + ! NILP (bar) || (bar = condemned, condemned = Qnil, - ! GC_NILP (bar)); + ! NILP (bar)); bar = XSCROLL_BAR (bar)->next) if (SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar)) == window_id && FRAME_X_DISPLAY (XFRAME (frame)) == display) @@ -4171,9 +4169,7 @@ { Lisp_Object tail; - for (tail = Vframe_list; - XGCTYPE (tail) == Lisp_Cons; - tail = XCDR (tail)) + for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { Lisp_Object frame = XCAR (tail); Widget menu_bar = XFRAME (frame)->output_data.x->menubar_widget; @@ -5559,7 +5555,7 @@ XEvent *event; struct input_event *emacs_event; { - if (! GC_WINDOWP (bar->window)) + if (! WINDOWP (bar->window)) abort (); emacs_event->kind = SCROLL_BAR_CLICK_EVENT; @@ -5654,7 +5650,7 @@ XSETVECTOR (last_mouse_scroll_bar, bar); /* If we're dragging the bar, display it. */ - if (! GC_NILP (bar->dragging)) + if (! NILP (bar->dragging)) { /* Where should the handle be now? */ int new_start = event->xmotion.y - XINT (bar->dragging);