From: Marius Gavrilescu Date: Sat, 16 Jun 2018 21:04:53 +0000 (+0300) Subject: Do not use "false" in C X-Git-Tag: 0.001001~2 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=373437eab532a194c035e161d6c9294c577380cb;p=digest-highwayhash.git Do not use "false" in C --- diff --git a/HighwayHash.xs b/HighwayHash.xs index 3761300..d1cca32 100644 --- a/HighwayHash.xs +++ b/HighwayHash.xs @@ -24,14 +24,14 @@ void process_key(pTHX_ AV *key_av, uint64_t *key) { } } -uint64_t highway_hash64(AV *key_av, char *bytes, uint64_t size) { +uint64_t highway_hash64(AV *key_av, unsigned char *bytes, uint64_t size) { dTHX; uint64_t key[4]; process_key(aTHX_ key_av, key); return HighwayHash64(bytes, size, key); } -AV* highway_hash128(AV *key_av, char *bytes, uint64_t size) { +AV* highway_hash128(AV *key_av, unsigned char *bytes, uint64_t size) { dTHX; AV* result; uint64_t key[4]; @@ -44,7 +44,7 @@ AV* highway_hash128(AV *key_av, char *bytes, uint64_t size) { return result; } -AV* highway_hash256(AV *key_av, char *bytes, uint64_t size) { +AV* highway_hash256(AV *key_av, unsigned char *bytes, uint64_t size) { dTHX; AV* result; uint64_t key[4]; @@ -60,11 +60,12 @@ AV* highway_hash256(AV *key_av, char *bytes, uint64_t size) { } MODULE = Digest::HighwayHash PACKAGE = Digest::HighwayHash +PROTOTYPES: DISABLE BOOT: PERL_MATH_INT64_LOAD_OR_CROAK; -uint64_t highway_hash64(AV *key_av, char *bytes, uint64_t length(bytes)) +uint64_t highway_hash64(AV *key_av, unsigned char *bytes, uint64_t length(bytes)) -AV* highway_hash128(AV *key_av, char *bytes, uint64_t length(bytes)) +AV* highway_hash128(AV *key_av, unsigned char *bytes, uint64_t length(bytes)) -AV* highway_hash256(AV *key_av, char *bytes, uint64_t length(bytes)) +AV* highway_hash256(AV *key_av, unsigned char *bytes, uint64_t length(bytes))