[svn:parrot] r44255 - in branches/sys_mem_reduce: include/parrot src/gc

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Feb 20 22:57:13 UTC 2010


Author: bacek
Date: Sat Feb 20 22:57:12 2010
New Revision: 44255
URL: https://trac.parrot.org/parrot/changeset/44255

Log:
Fix param guards.

Modified:
   branches/sys_mem_reduce/include/parrot/gc_api.h
   branches/sys_mem_reduce/src/gc/api.c
   branches/sys_mem_reduce/src/gc/gc_ms.c

Modified: branches/sys_mem_reduce/include/parrot/gc_api.h
==============================================================================
--- branches/sys_mem_reduce/include/parrot/gc_api.h	Sat Feb 20 22:50:44 2010	(r44254)
+++ branches/sys_mem_reduce/include/parrot/gc_api.h	Sat Feb 20 22:57:12 2010	(r44255)
@@ -121,9 +121,8 @@
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
-void Parrot_gc_free_memory_chunk(PARROT_INTERP, ARGIN(void *data))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+void Parrot_gc_free_memory_chunk(PARROT_INTERP, ARGIN_NULLOK(void *data))
+        __attribute__nonnull__(1);
 
 PARROT_EXPORT
 void Parrot_gc_mark_PMC_alive_fun(PARROT_INTERP, ARGMOD_NULLOK(PMC *obj))
@@ -145,19 +144,17 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 void * Parrot_gc_reallocate_memory_chunk(PARROT_INTERP,
-    ARGIN(void *data),
+    ARGFREE(void *data),
     size_t newsize)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(1);
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 void * Parrot_gc_reallocate_memory_chunk_with_interior_pointers(PARROT_INTERP,
-    ARGIN(void *data),
+    ARGFREE(void *data),
     size_t newsize,
     size_t oldsize)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(1);
 
 PARROT_EXPORT
 unsigned int Parrot_is_blocked_GC_mark(PARROT_INTERP)
@@ -346,8 +343,7 @@
      __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_gc_free_memory_chunk __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(data))
+       PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_gc_mark_PMC_alive_fun __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_gc_mark_PObj_alive __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -358,12 +354,10 @@
        PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_gc_reallocate_memory_chunk \
      __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(data))
+       PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_gc_reallocate_memory_chunk_with_interior_pointers \
      __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(data))
+       PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_is_blocked_GC_mark __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_is_blocked_GC_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = (\

Modified: branches/sys_mem_reduce/src/gc/api.c
==============================================================================
--- branches/sys_mem_reduce/src/gc/api.c	Sat Feb 20 22:50:44 2010	(r44254)
+++ branches/sys_mem_reduce/src/gc/api.c	Sat Feb 20 22:57:12 2010	(r44255)
@@ -683,7 +683,7 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 void *
-Parrot_gc_reallocate_memory_chunk(PARROT_INTERP, ARGIN(void *data), size_t newsize)
+Parrot_gc_reallocate_memory_chunk(PARROT_INTERP, ARGFREE(void *data), size_t newsize)
 {
     ASSERT_ARGS(Parrot_gc_reallocate_memory_chunk)
     return interp->gc_sys->reallocate_memory_chunk(interp, data, newsize);
@@ -692,7 +692,7 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 void
-Parrot_gc_free_memory_chunk(PARROT_INTERP, ARGIN(void *data))
+Parrot_gc_free_memory_chunk(PARROT_INTERP, ARGIN_NULLOK(void *data))
 {
     ASSERT_ARGS(Parrot_gc_free_memory_chunk)
     interp->gc_sys->free_memory_chunk(interp, data);
@@ -712,7 +712,7 @@
 PARROT_CANNOT_RETURN_NULL
 void *
 Parrot_gc_reallocate_memory_chunk_with_interior_pointers(PARROT_INTERP,
-        ARGIN(void *data), size_t newsize, size_t oldsize)
+        ARGFREE(void *data), size_t newsize, size_t oldsize)
 {
     ASSERT_ARGS(Parrot_gc_reallocate_memory_chunk_with_interior_pointers)
     return interp->gc_sys->reallocate_memory_chunk_with_interior_pointers(interp,

Modified: branches/sys_mem_reduce/src/gc/gc_ms.c
==============================================================================
--- branches/sys_mem_reduce/src/gc/gc_ms.c	Sat Feb 20 22:50:44 2010	(r44254)
+++ branches/sys_mem_reduce/src/gc/gc_ms.c	Sat Feb 20 22:57:12 2010	(r44255)
@@ -107,9 +107,8 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*obj);
 
-static void gc_ms_free_memory_chunk(PARROT_INTERP, ARGIN(void *data))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+static void gc_ms_free_memory_chunk(PARROT_INTERP, ARGFREE(void *data))
+        __attribute__nonnull__(1);
 
 static void gc_ms_free_pmc_header(PARROT_INTERP, ARGMOD(PMC *pmc))
         __attribute__nonnull__(1)
@@ -167,17 +166,15 @@
         FUNC_MODIFIES(*buffer);
 
 static void * gc_ms_reallocate_memory_chunk(PARROT_INTERP,
-    ARGIN(void *data),
+    ARGFREE(void *data),
     size_t newsize)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(1);
 
 static void * gc_ms_reallocate_memory_chunk_zeroed(PARROT_INTERP,
-    ARGIN(void *data),
+    ARGFREE(void *data),
     size_t newsize,
     size_t oldsize)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(1);
 
 static void gc_ms_reallocate_string_storage(PARROT_INTERP,
     ARGMOD(STRING *str),
@@ -260,8 +257,7 @@
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(obj))
 #define ASSERT_ARGS_gc_ms_free_memory_chunk __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(data))
+       PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_gc_ms_free_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc))
@@ -294,12 +290,10 @@
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(buffer))
 #define ASSERT_ARGS_gc_ms_reallocate_memory_chunk __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(data))
+       PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_gc_ms_reallocate_memory_chunk_zeroed \
      __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(data))
+       PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_gc_ms_reallocate_string_storage \
      __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
@@ -1138,7 +1132,7 @@
 }
 
 static void *
-gc_ms_reallocate_memory_chunk_zeroed(PARROT_INTERP, ARGIN(void *data),
+gc_ms_reallocate_memory_chunk_zeroed(PARROT_INTERP, ARGFREE(void *data),
         size_t newsize, size_t oldsize)
 {
     ASSERT_ARGS(gc_ms_reallocate_memory_chunk_zeroed)
@@ -1149,7 +1143,7 @@
 }
 
 static void
-gc_ms_free_memory_chunk(PARROT_INTERP, ARGIN(void *data))
+gc_ms_free_memory_chunk(PARROT_INTERP, ARGFREE(void *data))
 {
     ASSERT_ARGS(gc_ms_free_memory_chunk)
     mem_sys_free(data);


More information about the parrot-commits mailing list