Author: yamakenz
Date: Tue Jul 17 22:12:38 2007
New Revision: 4735

Modified:
   libgcroots-trunk/gcroots.c
   libgcroots-trunk/include/gcroots.h

Log:
* include/gcroots.h
* gcroots.c
  - Cosmetic changes


Modified: libgcroots-trunk/gcroots.c
==============================================================================
--- libgcroots-trunk/gcroots.c  (original)
+++ libgcroots-trunk/gcroots.c  Tue Jul 17 22:12:38 2007
@@ -123,20 +123,20 @@
     return ret;
 }
 
-int
-GCROOTS_is_protected_context(GCROOTS_context *ctx)
+void
+GCROOTS_mark(GCROOTS_context *ctx)
 {
     assert(ctx);
 
-    return (ctx->stack_base) ? TRUE : FALSE;
+    GC_push_regs_and_stack((ptr_t)ctx);
 }
 
-void
-GCROOTS_mark(GCROOTS_context *ctx)
+int
+GCROOTS_is_protected_context(GCROOTS_context *ctx)
 {
     assert(ctx);
 
-    GC_push_regs_and_stack((ptr_t)ctx);
+    return (ctx->stack_base) ? TRUE : FALSE;
 }
 
 int
@@ -147,7 +147,7 @@
     assert(ctx);
 
     if (!GCROOTS_is_protected_context(ctx))
-      return FALSE;
+        return FALSE;
 
     tmp_ctx = *ctx;
     tmp_ctx.mark = find_obj; /* not actually a mark function */
@@ -167,13 +167,13 @@
 
     offset = 0;
     do {
-      for (p = (void **)start + offset; p < (void **)end; p++) {
-        if (*p == findee) {
-          found = TRUE;
-          return;
+        for (p = (void **)start + offset; p < (void **)end; p++) {
+            if (*p == findee) {
+                found = TRUE;
+                return;
+            }
         }
-      }
-      offset += ALIGNOF_VOID_P;
+        offset += ALIGNOF_VOID_P;
     } while (!is_aligned
              && SIZEOF_VOID_P != ALIGNOF_VOID_P
              && offset % SIZEOF_VOID_P);

Modified: libgcroots-trunk/include/gcroots.h
==============================================================================
--- libgcroots-trunk/include/gcroots.h  (original)
+++ libgcroots-trunk/include/gcroots.h  Tue Jul 17 22:12:38 2007
@@ -51,8 +51,8 @@
                                        void *arg);
 void GCROOTS_mark(GCROOTS_context *ctx);
 
-int GCROOTS_is_protected(GCROOTS_context *ctx, void *obj);
 int GCROOTS_is_protected_context(GCROOTS_context *ctx);
+int GCROOTS_is_protected(GCROOTS_context *ctx, void *obj);
 
 #ifdef __cplusplus
 }

Reply via email to