changeset 8009:abbe65c17b55

(RETURN_UNGCPRO): Swallow semicolon. (GCPRO5): New macro.
author Richard M. Stallman <rms@gnu.org>
date Wed, 22 Jun 1994 20:11:29 +0000
parents 049bc48732d6
children e199eda519b5
files src/lisp.h
diffstat 1 files changed, 17 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/lisp.h	Wed Jun 22 18:03:28 1994 +0000
+++ b/src/lisp.h	Wed Jun 22 20:11:29 1994 +0000
@@ -1069,6 +1069,14 @@
   gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
   gcprolist = &gcpro4; }
 
+#define GCPRO5(varname1, varname2, varname3, varname4, varname5) \
+ {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
+  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
+  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
+  gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
+  gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
+  gcprolist = &gcpro5; }
+
 /* Call staticpro (&var) to protect static variable `var'. */
 
 void staticpro();
@@ -1079,13 +1087,15 @@
    to have a `do ... while' clause around this to make it interact
    with semicolons correctly, but this makes some compilers complain
    that the while is never reached.  */
-#define RETURN_UNGCPRO(expr)		\
-    {					\
-      Lisp_Object ret_ungc_val;		\
-      ret_ungc_val = (expr);		\
-      UNGCPRO;				\
-      return ret_ungc_val;		\
-    }
+#define RETURN_UNGCPRO(expr)			\
+do						\
+    {						\
+      Lisp_Object ret_ungc_val;			\
+      ret_ungc_val = (expr);			\
+      UNGCPRO;					\
+      return ret_ungc_val;			\
+    }						\
+while (1)
 
 /* Defined in data.c */
 extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound;