Commit 7e3ab302 authored by Paul Eggert's avatar Paul Eggert
Browse files

* lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,

so that the caller can use some name other than gcpro1.
(GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
(Fx_create_frame, x_create_tip_frame, Fx_show_tip):
(Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
macros.
parent 06b0c8a0
2011-03-10 Paul Eggert <eggert@cs.ucla.edu>
 
* lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
so that the caller can use some name other than gcpro1.
(GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
* xfns.c (x_decode_color, x_set_name, x_window): Now static.
(Fx_create_frame): Add braces to silence GCC warning.
(Fx_file_dialog, Fx_select_font): Fix pointer signedness.
(x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
Remove unused locals.
(Fx_create_frame, x_create_tip_frame, Fx_show_tip):
(Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
macros.
 
2011-03-09 Paul Eggert <eggert@cs.ucla.edu>
 
......@@ -2150,12 +2150,15 @@ struct gcpro
|| GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS)
#define GCPRO1(varname) GCPRO1_VAR (varname, gcpro1)
#define UNGCPRO UNGCPRO_VAR (gcpro1)
#if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS
/* Do something silly with gcproN vars just so gcc shuts up. */
/* You get warnings from MIPSPro... */
#define GCPRO1(varname) ((void) gcpro1)
#define GCPRO1_VAR(varname, gcpro1) ((void) gcpro1)
#define GCPRO2(varname1, varname2)(((void) gcpro2, (void) gcpro1))
#define GCPRO3(varname1, varname2, varname3) \
(((void) gcpro3, (void) gcpro2, (void) gcpro1))
......@@ -2165,13 +2168,13 @@ struct gcpro
(((void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1))
#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \
(((void) gcpro6, (void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1))
#define UNGCPRO ((void) 0)
#define UNGCPRO_VAR(gcpro1) ((void) 0)
#else /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */
#ifndef DEBUG_GCPRO
#define GCPRO1(varname) \
#define GCPRO1_VAR(varname, gcpro1) \
{gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \
gcprolist = &gcpro1; }
......@@ -2210,13 +2213,13 @@ struct gcpro
gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \
gcprolist = &gcpro6; }
#define UNGCPRO (gcprolist = gcpro1.next)
#define UNGCPRO_VAR(gcpro1) (gcprolist = gcpro1.next)
#else
extern int gcpro_level;
#define GCPRO1(varname) \
#define GCPRO1_VAR(varname, gcpro1) \
{gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \
gcpro1.level = gcpro_level++; \
gcprolist = &gcpro1; }
......@@ -2266,7 +2269,7 @@ extern int gcpro_level;
gcpro6.level = gcpro_level++; \
gcprolist = &gcpro6; }
#define UNGCPRO \
#define UNGCPRO_VAR(gcpro1) \
((--gcpro_level != gcpro1.level) \
? (abort (), 0) \
: ((gcprolist = gcpro1.next), 0))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment