[uim-commit] r1158 - branches/r5rs/sigscheme

kzk at freedesktop.org kzk at freedesktop.org
Mon Aug 8 02:37:14 EST 2005


Author: kzk
Date: 2005-08-07 09:37:12 -0700 (Sun, 07 Aug 2005)
New Revision: 1158

Modified:
   branches/r5rs/sigscheme/sigschemetype.h
Log:
* sigscheme/sigschemetype.h
  - (SCM_NEW_ETC): enclose macro with do-while loop


Modified: branches/r5rs/sigscheme/sigschemetype.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype.h	2005-08-07 16:12:43 UTC (rev 1157)
+++ branches/r5rs/sigscheme/sigschemetype.h	2005-08-07 16:37:12 UTC (rev 1158)
@@ -335,10 +335,12 @@
 #define SCM_ETC(a) (sigassert(SCM_ETCP(a)), (a))
 #define SCM_ETC_TYPE(a) (SCM_ETC(a)->obj.etc.type)
 #define SCM_SETETC_TYPE(a, etctype) (SCM_ETC_TYPE(a) = (etctype))
-#define SCM_NEW_ETC(a, impl, etctype) \
-    (a) = &(impl);\
-    SCM_SETTYPE((a), ScmEtc);\
-    SCM_SETETC_TYPE((a), (etctype));
+#define SCM_NEW_ETC(a, impl, etctype)     \
+    do {                                  \
+        (a) = &(impl);                    \
+        SCM_SETTYPE((a), ScmEtc);         \
+        SCM_SETETC_TYPE((a), (etctype));  \
+    } while(0)
 
 /*============================================================================
   For C-Interface



More information about the uim-commit mailing list