Skip to content

Fix undefined use of <cstdint> types #747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions test/hash_functions/SpookyV2Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@ extern "C" {
#endif

void SpookyHash32_with_state_test(const void *key, size_t len, const void *state, void *out) {
uint64_t *state64= (uint64_t *)state;
uint64_t s0 = state64[0];
uint64_t s1 = state64[1];
uint64 *state64= (uint64 *)state;
uint64 s0 = state64[0];
uint64 s1 = state64[1];
SpookyHash::Hash128(key, len, &s0, &s1);
((uint32_t *)out)[0]= (uint32_t)s0;
((uint32 *)out)[0]= (uint32)s0;
}

void SpookyHash64_with_state_test(const void *key, size_t len, const void *state, void *out) {
uint64_t *state64= (uint64_t *)state;
uint64_t *out64= (uint64_t *)out;
uint64 *state64= (uint64 *)state;
uint64 *out64= (uint64 *)out;
out64[0] = state64[0];
uint64_t s1 = state64[1];
uint64 s1 = state64[1];
SpookyHash::Hash128(key, len, out64, &s1);
}

void SpookyHash128_with_state_test(const void *key, size_t len, const void *state, void *out) {
uint64_t *state64= (uint64_t *)state;
uint64_t *out64= (uint64_t *)out;
uint64 *state64= (uint64 *)state;
uint64 *out64= (uint64 *)out;
out64[0] = state64[0];
out64[1] = state64[1];
SpookyHash::Hash128(key, len, out64, out64+1);
}

void SpookyHash_seed_state_test(int in_bits, const void *seed, void *state) {
uint64_t *state64= (uint64_t *)state;
uint64 *state64= (uint64 *)state;
if (in_bits == 32) {
state64[0]= state64[1]= ((uint32_t*)seed)[0];
state64[0]= state64[1]= ((uint32*)seed)[0];
}
else {
uint64_t *seed64= (uint64_t *)seed;
uint64 *seed64= (uint64 *)seed;
if (in_bits == 64) {
state64[0]= state64[1]= seed64[0];
}
Expand Down