Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

allow the ARGIN arg to be ARGIN_NULLOK

  • Loading branch information...
commit c4a940274fbcee199c7654178812e1a09c244e67 1 parent 77ee887
Andy Lester petdance authored
Showing with 4 additions and 6 deletions.
  1. +3 −5 include/parrot/hash.h
  2. +1 −1  src/hash.c
8 include/parrot/hash.h
View
@@ -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) \
@@ -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 */
2  src/hash.c
View
@@ -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--) {
Please sign in to comment.
Something went wrong with that request. Please try again.