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

petdance at svn.parrot.org petdance at svn.parrot.org
Mon May 10 01:16:46 UTC 2010


Author: petdance
Date: Mon May 10 01:16:45 2010
New Revision: 46451
URL: https://trac.parrot.org/parrot/changeset/46451

Log:
updating annotations

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

Modified: trunk/include/parrot/hash.h
==============================================================================
--- trunk/include/parrot/hash.h	Mon May 10 01:14:23 2010	(r46450)
+++ trunk/include/parrot/hash.h	Mon May 10 01:16:45 2010	(r46451)
@@ -39,7 +39,7 @@
 #define HASH_ALLOC_SIZE(n) (N_BUCKETS(n) * sizeof (HashBucket) + \
                                      (n) * sizeof (HashBucket *))
 
-typedef int (*hash_comp_fn)(PARROT_INTERP, const void *const, const void *const);
+typedef int (*hash_comp_fn)(PARROT_INTERP, ARGIN(const void *), ARGIN(const void *));
 typedef void (*hash_mark_key_fn)(PARROT_INTERP, PObj *);
 typedef size_t (*hash_hash_key_fn)(PARROT_INTERP, ARGIN(const void *), size_t seed);
 
@@ -74,7 +74,7 @@
     hash_hash_key_fn hash_val;  /* generate a hash value for key */
 };
 
-typedef void (*value_free)(void *);
+typedef void (*value_free)(ARGFREE(void *));
 
 /* To avoid creating OrderedHashItem PMC we reuse FixedPMCArray PMC */
 /* So, there is indexes to avoid using of "magick constants" */
@@ -348,7 +348,7 @@
 
 void parrot_chash_destroy_values(PARROT_INTERP,
     ARGMOD(Hash *hash),
-    ARGIN(value_free func))
+    NOTNULL(value_free func))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)
@@ -360,8 +360,8 @@
 Hash * parrot_create_hash(PARROT_INTERP,
     PARROT_DATA_TYPE val_type,
     Hash_key_type hkey_type,
-    ARGIN(hash_comp_fn compare),
-    ARGIN(hash_hash_key_fn keyhash))
+    NOTNULL(hash_comp_fn compare),
+    NOTNULL(hash_hash_key_fn keyhash))
         __attribute__nonnull__(1)
         __attribute__nonnull__(4)
         __attribute__nonnull__(5);

Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c	Mon May 10 01:14:23 2010	(r46450)
+++ trunk/src/hash.c	Mon May 10 01:16:45 2010	(r46451)
@@ -1004,7 +1004,7 @@
 PARROT_MALLOC
 Hash *
 parrot_create_hash(PARROT_INTERP, PARROT_DATA_TYPE val_type, Hash_key_type hkey_type,
-        ARGIN(hash_comp_fn compare), ARGIN(hash_hash_key_fn keyhash))
+        NOTNULL(hash_comp_fn compare), NOTNULL(hash_hash_key_fn keyhash))
 {
     ASSERT_ARGS(parrot_create_hash)
     HashBucket  *bp;
@@ -1122,7 +1122,7 @@
 
 void
 parrot_chash_destroy_values(PARROT_INTERP, ARGMOD(Hash *hash),
-    ARGIN(value_free func))
+    NOTNULL(value_free func))
 {
     ASSERT_ARGS(parrot_chash_destroy_values)
     UINTVAL i;


More information about the parrot-commits mailing list