[svn:parrot] r43378 - branches/boehm_gc/src/gc

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Jan 3 21:23:30 UTC 2010


Author: bacek
Date: Sun Jan  3 21:23:28 2010
New Revision: 43378
URL: https://trac.parrot.org/parrot/changeset/43378

Log:
Update gc_boehm_finilizer_cb to use void* instead of typedefed GC_PTR which was removed in Boehm GC 7+

Modified:
   branches/boehm_gc/src/gc/gc_boehm.c

Modified: branches/boehm_gc/src/gc/gc_boehm.c
==============================================================================
--- branches/boehm_gc/src/gc/gc_boehm.c	Sun Jan  3 04:01:59 2010	(r43377)
+++ branches/boehm_gc/src/gc/gc_boehm.c	Sun Jan  3 21:23:28 2010	(r43378)
@@ -38,7 +38,10 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*pool);
 
-static void gc_boehm_finalize_cb(GC_PTR obj, GC_PTR user_data);
+static void gc_boehm_finalize_cb(ARGIN(void *obj), ARGIN(void *user_data))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
 PARROT_CANNOT_RETURN_NULL
 static void * gc_boehm_get_free_object(PARROT_INTERP,
     ARGMOD(Fixed_Size_Pool *pool))
@@ -46,7 +49,9 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*pool);
 
-static void gc_boehm_mark_and_sweep(SHIM_INTERP, UINTVAL flags);
+static void gc_boehm_mark_and_sweep(PARROT_INTERP, UINTVAL flags)
+        __attribute__nonnull__(1);
+
 static void gc_boehm_more_traceable_objects(SHIM_INTERP,
     ARGMOD(Fixed_Size_Pool *pool))
         __attribute__nonnull__(2)
@@ -56,20 +61,23 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*pool);
 
-#  define ASSERT_ARGS_gc_boehm_add_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_gc_boehm_add_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(pool) \
-     , PARROT_ASSERT_ARG(to_add))
-#  define ASSERT_ARGS_gc_boehm_alloc_objects __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+    , PARROT_ASSERT_ARG(to_add))
+#define ASSERT_ARGS_gc_boehm_alloc_objects __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(pool))
-#  define ASSERT_ARGS_gc_boehm_finalize_cb __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#  define ASSERT_ARGS_gc_boehm_get_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_gc_boehm_finalize_cb __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(obj) \
+    , PARROT_ASSERT_ARG(user_data))
+#define ASSERT_ARGS_gc_boehm_get_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
-     , PARROT_ASSERT_ARG(pool))
-#  define ASSERT_ARGS_gc_boehm_mark_and_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#  define ASSERT_ARGS_gc_boehm_more_traceable_objects \
+    , PARROT_ASSERT_ARG(pool))
+#define ASSERT_ARGS_gc_boehm_mark_and_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_gc_boehm_more_traceable_objects \
      __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(pool))
-#  define ASSERT_ARGS_gc_boehm_pool_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_gc_boehm_pool_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(pool))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: static */
@@ -246,7 +254,7 @@
 
 /*
 
-=item C<static void gc_boehm_finalize_cb(GC_PTR obj, GC_PTR user_data)>
+=item C<static void gc_boehm_finalize_cb(void *obj, void *user_data)>
 
 this function is passed to the finalizer
 
@@ -254,8 +262,9 @@
 
 */
 static void
-gc_boehm_finalize_cb(GC_PTR obj, GC_PTR user_data)
+gc_boehm_finalize_cb(ARGIN(void *obj), ARGIN(void *user_data))
 {
+    ASSERT_ARGS(gc_boehm_finalize_cb)
     PMC           *pmc    = (PMC*)obj;
     Parrot_Interp  interp = (Parrot_Interp)user_data;
 


More information about the parrot-commits mailing list