Author: Whiteknight
Date: Sun Jul 20 18:08:30 2008
New Revision: 29637

Modified:
   branches/gsoc_pdd09/include/parrot/dod.h
   branches/gsoc_pdd09/include/parrot/smallobject.h
   branches/gsoc_pdd09/src/gc/gc_it.c

Log:
[gsoc_pdd09] coding standards: fix macro arguments to use parenthesis properly

Modified: branches/gsoc_pdd09/include/parrot/dod.h
==============================================================================
--- branches/gsoc_pdd09/include/parrot/dod.h    (original)
+++ branches/gsoc_pdd09/include/parrot/dod.h    Sun Jul 20 18:08:30 2008
@@ -391,19 +391,19 @@
        mark the new item too. */
 #  define GC_WRITE_BARRIER(interp, agg, old, _new) do { \
     if ((agg)) \
-        pobject_lives(interp, (PObj*)(agg)); \
+        pobject_lives((interp), (PObj*)(agg)); \
     if ((_new)) \
-        pobject_lives(interp, (PObj*)(_new)); \
+        pobject_lives((interp), (PObj*)(_new)); \
 } while (0)
     /* Mark the aggregate, the new object and the new_key, they are all
        apparently being used and I want to make sure they don't get lost */
 #  define GC_WRITE_BARRIER_KEY(interp, agg, old, old_key, _new, new_key) do {\
     if ((agg)) \
-        pobject_lives(interp, (PObj*)(agg)); \
+        pobject_lives((interp), (PObj*)(agg)); \
     if ((_new)) \
-        pobject_lives(interp, (PObj*)_new); \
+        pobject_lives((interp), (PObj*)(_new)); \
     if ((new_key)) \
-        pobject_lives(interp, (PObj*)new_key); \
+        pobject_lives((interp), (PObj*)(new_key)); \
 } while (0)
 #endif
 

Modified: branches/gsoc_pdd09/include/parrot/smallobject.h
==============================================================================
--- branches/gsoc_pdd09/include/parrot/smallobject.h    (original)
+++ branches/gsoc_pdd09/include/parrot/smallobject.h    Sun Jul 20 18:08:30 2008
@@ -305,7 +305,7 @@
 #  define ARENA_to_PObj(p) (p)
 #endif
 
-#define GC_NEXT_OBJECT_IN_POOL(ptr, size) (void*)((char*)ptr + size)
+#define GC_NEXT_OBJECT_IN_POOL(ptr, size) (void*)((char*)(ptr) + (size))
 
 
 /* HEADERIZER BEGIN: src/gc/smallobject.c */

Modified: branches/gsoc_pdd09/src/gc/gc_it.c
==============================================================================
--- branches/gsoc_pdd09/src/gc/gc_it.c  (original)
+++ branches/gsoc_pdd09/src/gc/gc_it.c  Sun Jul 20 18:08:30 2008
@@ -520,15 +520,12 @@
 {
     const Arenas * const arena_base   = interp->arena_base;
     Gc_it_data   * const gc_priv_data = (Gc_it_data *)arena_base->gc_private;
-
     register INTVAL i;
 
-#    define gc_it_sweep_sized_arenas(i, d, p) gc_it_sweep_header_arenas(i, d, 
p)
-
     for (i = arena_base->num_sized - 1; i >= 0; i--) {
         Small_Object_Pool * const pool = arena_base->sized_header_pools[i];
         if (pool)
-            gc_it_sweep_sized_arenas(interp, gc_priv_data, pool);
+            gc_it_sweep_header_arenas(interp, gc_priv_data, pool);
     }
 
 }

Reply via email to