* __scm.h: Fix a bunch of macros that were missing do-while(0)
authorGreg J. Badros <gjb@cs.washington.edu>
Tue, 28 Sep 1999 00:18:16 +0000 (00:18 +0000)
committerGreg J. Badros <gjb@cs.washington.edu>
Tue, 28 Sep 1999 00:18:16 +0000 (00:18 +0000)
sandwiches.

* debug.c, eval.c: Fix buggy uses of SCM_ALLOW_INTS (missing
semicolon) exposed by the above change.

libguile/__scm.h
libguile/debug.c
libguile/eval.c

index 6bb00ce..1700f9f 100644 (file)
@@ -254,10 +254,10 @@ typedef long SCM_STACKITEM;
 extern unsigned int scm_async_clock;
 
 #define SCM_ASYNC_TICK \
-{ \
+do { \
   if (0 == --scm_async_clock) \
     scm_async_click (); \
-} \
+} while(0)
 
 #ifdef SCM_CAREFUL_INTS
 #define SCM_CHECK_NOT_DISABLED \
@@ -296,25 +296,25 @@ extern unsigned int scm_async_clock;
 #endif
 
 #define SCM_DEFER_INTS \
-{ \
+do { \
   SCM_FENCE; \
   SCM_CHECK_NOT_DISABLED; \
   SCM_THREAD_DEFER; \
   SCM_FENCE; \
   scm_ints_disabled = 1; \
   SCM_FENCE; \
-} \
+} while (0)
 
 
 #define SCM_ALLOW_INTS_ONLY \
-{ \
+do { \
   SCM_THREAD_ALLOW; \
   scm_ints_disabled = 0; \
-} \
+} while (0)
 
 
 #define SCM_ALLOW_INTS \
-{ \
+do { \
   SCM_FENCE; \
   SCM_CHECK_NOT_ENABLED; \
   SCM_THREAD_SWITCHING_CODE; \
@@ -324,20 +324,20 @@ extern unsigned int scm_async_clock;
   SCM_THREAD_ALLOW; \
   SCM_ASYNC_TICK; \
   SCM_FENCE; \
-} \
+} while (0)
 
 
 #define SCM_REDEFER_INTS  \
-{ \
+do { \
   SCM_FENCE; \
   SCM_THREAD_REDEFER; \
   ++scm_ints_disabled; \
   SCM_FENCE; \
-} \
+} while (0)
 
 
 #define SCM_REALLOW_INTS \
-{ \
+do { \
   SCM_FENCE; \
   SCM_THREAD_REALLOW_1; \
   SCM_THREAD_SWITCHING_CODE; \
@@ -349,14 +349,14 @@ extern unsigned int scm_async_clock;
       SCM_ASYNC_TICK; \
     } \
   SCM_FENCE; \
-} \
+} while (0)
 
 
 #define SCM_TICK \
-{ \
+do { \
   SCM_DEFER_INTS; \
   SCM_ALLOW_INTS; \
-} \
+} while (0)
 
 \f
 
index c765ce1..2df0ebe 100644 (file)
@@ -89,7 +89,7 @@ scm_debug_options (setting)
   SCM_RESET_DEBUG_MODE;
   scm_stack_checking_enabled_p = SCM_STACK_CHECKING_P;
   scm_debug_eframe_size = 2 * SCM_N_FRAMES;
-  SCM_ALLOW_INTS
+  SCM_ALLOW_INTS;
   return ans;
 }
 
index cc565d2..ba87b54 100644 (file)
@@ -1796,7 +1796,7 @@ scm_evaluator_traps (setting)
                     SCM_N_EVALUATOR_TRAPS,
                     s_evaluator_traps);
   SCM_RESET_DEBUG_MODE;
-  SCM_ALLOW_INTS
+  SCM_ALLOW_INTS;
   return ans;
 }