Author: petdance
Date: Thu Feb 21 18:41:31 2008
New Revision: 25972

Modified:
   trunk/languages/cola/cola.h
   trunk/languages/dotnet/ops/dotnet.ops
   trunk/languages/lua/pmc/luatable.pmc

Log:
wrapped macro arguments

Modified: trunk/languages/cola/cola.h
==============================================================================
--- trunk/languages/cola/cola.h (original)
+++ trunk/languages/cola/cola.h Thu Feb 21 18:41:31 2008
@@ -387,11 +387,11 @@
 char                *op_name(int);
 int                 op_inverse(int);
 
-#  define NAME(x) (x->literal == NULL ? x->name : x->literal->name)
-#  define IS_LVAL(x)  (x->is_lval)
-#  define IS_RVAL(x)  (!x->is_lval)
+#  define NAME(x) ((x)->literal == NULL ? (x)->name : (x)->literal->name)
+#  define IS_LVAL(x)  ((x)->is_lval)
+#  define IS_RVAL(x)  (!(x)->is_lval)
 #  define SWITCH_OR_LOOP() (primary_block > 0 ? 1 : 0)
-#  define eval_expr(x) ((x->asttype == ASTT_LITERAL || x->asttype == 
ASTT_IDENTIFIER) ? (x->targ = x->sym, 1) : 0)
+#  define eval_expr(x) (((x)->asttype == ASTT_LITERAL || (x)->asttype == 
ASTT_IDENTIFIER) ? ((x)->targ = (x)->sym, 1) : 0)
 
 extern long         line;
 

Modified: trunk/languages/dotnet/ops/dotnet.ops
==============================================================================
--- trunk/languages/dotnet/ops/dotnet.ops       (original)
+++ trunk/languages/dotnet/ops/dotnet.ops       Thu Feb 21 18:41:31 2008
@@ -52,7 +52,7 @@
 #define CHECK_MUL_OVERFLOW(a, b) \
         ((Parrot_Int4)(a) == 0) || ((Parrot_Int4)(b) == 0) ? 0 : \
         (((Parrot_Int4)(a) > 0) && ((Parrot_Int4)(b) == -1)) ? FALSE : \
-        (((Parrot_Int4)(a) < 0) && ((Parrot_Int4)(b) == -1)) ? (a == - 
MAX_INT4) : \
+        (((Parrot_Int4)(a) < 0) && ((Parrot_Int4)(b) == -1)) ? ((a) == - 
MAX_INT4) : \
         (((Parrot_Int4)(a) > 0) && ((Parrot_Int4)(b) > 0)) ? \
             (Parrot_Int4)(a) > ((MAX_INT4) / (Parrot_Int4)(b)) : \
         (((Parrot_Int4)(a) > 0) && ((Parrot_Int4)(b) < 0)) ? \

Modified: trunk/languages/lua/pmc/luatable.pmc
==============================================================================
--- trunk/languages/lua/pmc/luatable.pmc        (original)
+++ trunk/languages/lua/pmc/luatable.pmc        Thu Feb 21 18:41:31 2008
@@ -23,7 +23,7 @@
 
 #include "lua_private.h"
 
-#define LUA_ASSERT(c, s)         assert(((void)s, (c)))
+#define LUA_ASSERT(c, s)         assert(((void)(s), (c)))
 
 #define Hash LuaHash
 #define PMC_hash(s) (LuaHash *)PMC_struct_val((s))

Reply via email to