Skip to content

Commit

Permalink
upgrade submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
flier committed Apr 13, 2022
1 parent 62c24f1 commit d2734ba
Show file tree
Hide file tree
Showing 8 changed files with 1,338 additions and 1,205 deletions.
12 changes: 6 additions & 6 deletions fasthash-sys/src/fasthash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,35 @@ void SpookyHasherHash(
uint64 *hash1, // in/out: in seed 1, out hash value 1
uint64 *hash2) // in/out: in seed 2, out hash value 2
{
SpookyHash::Hash128(message, length, hash1, hash2);
SpookyHashV1::Hash128(message, length, hash1, hash2);
}

void *SpookyHasherNew() { return new SpookyHash(); }
void *SpookyHasherNew() { return new SpookyHashV1(); }

void SpookyHasherFree(void *h) { delete ((SpookyHash *)h); }
void SpookyHasherFree(void *h) { delete static_cast<SpookyHashV1 *>(h); }

void SpookyHasherInit(
void *h,
uint64 seed1, // any 64-bit value will do, including 0
uint64 seed2) // different seeds produce independent hashes
{
((SpookyHash *)h)->Init(seed1, seed2);
static_cast<SpookyHashV1 *>(h)->Init(seed1, seed2);
}

void SpookyHasherUpdate(
void *h,
const void *message, // message fragment
size_t length) // length of message fragment in bytes
{
((SpookyHash *)h)->Update(message, length);
static_cast<SpookyHashV1 *>(h)->Update(message, length);
}

void SpookyHasherFinal(
void *h,
uint64 *hash1, // out only: first 64 bits of hash value.
uint64 *hash2) // out only: second 64 bits of hash value.
{
((SpookyHash *)h)->Final(hash1, hash2);
static_cast<SpookyHashV1 *>(h)->Final(hash1, hash2);
}

#endif
Expand Down
2 changes: 0 additions & 2 deletions fasthash-sys/src/fasthash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ uint64_t farmhash_fingerprint_uint64(uint64_t x);

void MeowHash128(const void *key, int len, void *seed, void *out);

typedef struct meow_state;

void MeowHashBegin(meow_state *State, void *Seed128);

void MeowHashUpdate(meow_state *State, size_t Len, void *SourceInit);
Expand Down
Loading

0 comments on commit d2734ba

Please sign in to comment.