[svn:parrot] r48879 - branches/hash_inlined_func/src
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Thu Sep 9 06:36:19 UTC 2010
Author: chromatic
Date: Thu Sep 9 06:36:19 2010
New Revision: 48879
URL: https://trac.parrot.org/parrot/changeset/48879
Log:
[hash] Fixed key annotation for key_hash().
Int keys can be NULL, so the specific hashing functions for other key types
have to catch undesired NULLness.
Modified:
branches/hash_inlined_func/src/hash.c
Modified: branches/hash_inlined_func/src/hash.c
==============================================================================
--- branches/hash_inlined_func/src/hash.c Thu Sep 9 06:36:15 2010 (r48878)
+++ branches/hash_inlined_func/src/hash.c Thu Sep 9 06:36:19 2010 (r48879)
@@ -79,10 +79,9 @@
PARROT_INLINE
static size_t key_hash(PARROT_INTERP,
ARGIN(const Hash *hash),
- ARGIN(void *key))
+ ARGIN_NULLOK(void *key))
__attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
+ __attribute__nonnull__(2);
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
@@ -132,8 +131,7 @@
, PARROT_ASSERT_ARG(b))
#define ASSERT_ARGS_key_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(hash) \
- , PARROT_ASSERT_ARG(key))
+ , PARROT_ASSERT_ARG(hash))
#define ASSERT_ARGS_key_hash_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_key_hash_pointer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -438,7 +436,7 @@
PARROT_PURE_FUNCTION
PARROT_INLINE
static size_t
-key_hash(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN(void *key))
+key_hash(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN_NULLOK(void *key))
{
ASSERT_ARGS(key_hash)
More information about the parrot-commits
mailing list