Skip to content

Commit

Permalink
allow the ARGIN arg to be ARGIN_NULLOK
Browse files Browse the repository at this point in the history
  • Loading branch information
petdance committed Mar 6, 2011
1 parent 77ee887 commit c4a9402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions include/parrot/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,9 @@ PARROT_HOT
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
size_t Parrot_hsh_hash_buffer(
ARGIN(const unsigned char *buf),
ARGIN_NULLOK(const unsigned char *buf),
size_t len,
size_t hashval)
__attribute__nonnull__(1);
size_t hashval);

#define ASSERT_ARGS_Parrot_hash_clone __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
Expand Down Expand Up @@ -521,8 +520,7 @@ size_t Parrot_hsh_hash_buffer(
#define ASSERT_ARGS_Parrot_hash_value_to_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(hash))
#define ASSERT_ARGS_Parrot_hsh_hash_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(buf))
#define ASSERT_ARGS_Parrot_hsh_hash_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/hash.c */

Expand Down
2 changes: 1 addition & 1 deletion src/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ PARROT_HOT
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
size_t
Parrot_hsh_hash_buffer(ARGIN(const unsigned char *buf), size_t len, size_t hashval)
Parrot_hsh_hash_buffer(ARGIN_NULLOK(const unsigned char *buf), size_t len, size_t hashval)
{
ASSERT_ARGS(Parrot_hsh_hash_buffer)
while (len--) {
Expand Down

0 comments on commit c4a9402

Please sign in to comment.