mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
Update fxhash constants
The fxhash implementation was missing a constant for 32-bit platforms. This has been fixed. Constant for 64-bit platform was update to match the current Rust constants.
This commit is contained in:
@@ -32,7 +32,11 @@
|
|||||||
#include <isc/bit.h>
|
#include <isc/bit.h>
|
||||||
|
|
||||||
/* The constant K from Rust's fxhash */
|
/* The constant K from Rust's fxhash */
|
||||||
#define K 0x9e3779b97f4a7c15ull
|
#if SIZE_MAX == UINT64_MAX
|
||||||
|
#define K UINT64_C(0x517cc1b727220a95)
|
||||||
|
#else
|
||||||
|
#define K UINT32_C(0x9e3779b9)
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
fx_add_to_hash(size_t hash, size_t i) {
|
fx_add_to_hash(size_t hash, size_t i) {
|
||||||
|
Reference in New Issue
Block a user