hashfunctions

generic hash functions and PRFs: Jenkins, FNV, siphash
git clone https://noulin.net/git/hashfunctions.git
Log | Files | Refs | LICENSE

commit 1e6fbeed03000f36de4fc16404f6c5ca1248fd3c
parent 1c7caabcb5b454e0228fdd33742c28f9b5133a9d
Author: Remy Noulin <loader2x@gmail.com>
Date:   Tue, 30 Apr 2019 19:41:02 +0200

add isCompiledWithCurrentLisheepyVersion

Diffstat:
Mhashfunctions.c | 5+++++
Mhashfunctions.h | 3+++
Mpackage.yml | 10+++++-----
3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/hashfunctions.c b/hashfunctions.c @@ -128,3 +128,8 @@ i32 jumpConsistentHash(u64 key, i32 bucketCount) { } return b; } + +bool checkLibsheepyVersionHashfunctions(const char *currentLibsheepyVersion) { + return eqG(currentLibsheepyVersion, LIBSHEEPY_VERSION); +} + diff --git a/hashfunctions.h b/hashfunctions.h @@ -12,3 +12,6 @@ u64 u64Hash(u64 k); u32 murmur2hash(const unsigned char *b, size_t len); i32 jumpConsistentHash(u64 key, i32 bucketCount); + +#define isHashfunctionsCompiledWithCurrentLisheepyVersion checkLibsheepyVersionHashfunctions(LIBSHEEPY_VERSION) +bool checkLibsheepyVersionHashfunctions(const char *currentLibsheepyVersion); diff --git a/package.yml b/package.yml @@ -1,16 +1,16 @@ --- name: hashfunctions - version: 0.0.6 + version: 0.0.7 description: "generic hash functions and PRFs: Jenkins, FNV, siphash, murmur2, murmur3, md5, jump consistent hash" bin: ./hashfunctions.c - cflags: -O3 -std=gnu11 -fPIC -pipe + cflags: "-O3 -std=gnu11 -fPIC -pipe" repository: type: git - url: git+https://github.com/RemyNoulin/hashfunctions.git + url: "git+https://github.com/RemyNoulin/hashfunctions.git" keywords: - hashing author: Anonymous license: MIT bugs: - url: https://github.com/RemyNoulin/hashfunctions/issues - homepage: https://github.com/RemyNoulin/hashfunctions + url: "https://github.com/RemyNoulin/hashfunctions/issues" + homepage: "https://github.com/RemyNoulin/hashfunctions"