[svn:parrot] r45608 - in trunk: include/parrot src

petdance at svn.parrot.org petdance at svn.parrot.org
Mon Apr 12 14:48:01 UTC 2010


Author: petdance
Date: Mon Apr 12 14:48:01 2010
New Revision: 45608
URL: https://trac.parrot.org/parrot/changeset/45608

Log:
fixing annotations on functions

Modified:
   trunk/include/parrot/hash.h
   trunk/src/hash.c

Modified: trunk/include/parrot/hash.h
==============================================================================
--- trunk/include/parrot/hash.h	Mon Apr 12 11:59:23 2010	(r45607)
+++ trunk/include/parrot/hash.h	Mon Apr 12 14:48:01 2010	(r45608)
@@ -184,9 +184,10 @@
         FUNC_MODIFIES(*pinfo);
 
 PARROT_EXPORT
-void parrot_mark_hash(PARROT_INTERP, ARGIN(Hash *hash))
+void parrot_mark_hash(PARROT_INTERP, ARGMOD(Hash *hash))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*hash);
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
@@ -371,9 +372,10 @@
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_PURE_FUNCTION
-int PMC_compare(PARROT_INTERP, ARGIN(PMC *a), ARGIN_NULLOK(PMC *b))
+int PMC_compare(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3);
 
 PARROT_WARN_UNUSED_RESULT
 int STRING_compare(PARROT_INTERP,
@@ -502,7 +504,8 @@
     , PARROT_ASSERT_ARG(keyhash))
 #define ASSERT_ARGS_PMC_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(a))
+    , PARROT_ASSERT_ARG(a) \
+    , PARROT_ASSERT_ARG(b))
 #define ASSERT_ARGS_STRING_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(search_key))

Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c	Mon Apr 12 11:59:23 2010	(r45607)
+++ trunk/src/hash.c	Mon Apr 12 14:48:01 2010	(r45608)
@@ -319,7 +319,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_PURE_FUNCTION
 int
-PMC_compare(PARROT_INTERP, ARGIN(PMC *a), ARGIN_NULLOK(PMC *b))
+PMC_compare(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b))
 {
     ASSERT_ARGS(PMC_compare)
 
@@ -406,7 +406,7 @@
 
 PARROT_EXPORT
 void
-parrot_mark_hash(PARROT_INTERP, ARGIN(Hash *hash))
+parrot_mark_hash(PARROT_INTERP, ARGMOD(Hash *hash))
 {
     ASSERT_ARGS(parrot_mark_hash)
     int mark_key   = 0;


More information about the parrot-commits mailing list