34 shift = 16 + (i % 16);
39 hash += 31 * ((int) bytes[i]) << shift;
59 return hash + 31 * (int) decimal;
63 return hash + 31 * (int) integer;
#define cast(type, obj)
Safely cast obj to type.
int HashForInteger(int hash, const long integer)
Accumulates the hash value of integer into hash.
int HashForObject(int hash, const ident obj)
Accumulates the hash value of object into hash.
int HashForCString(int hash, const char *string)
Accumulates the hash value of the null-terminated string into hash.
int HashForDecimal(int hash, const double decimal)
Accumulates the hash value of decimal into hash.
int HashForBytes(int hash, const uint8_t *bytes, const Range range)
Accumulates the hash value of bytes into hash.
int HashForCharacters(int hash, const char *chars, const Range range)
Accumulates the hash value of chars into hash.
Utilities for calculating hash values.
void * ident
The identity type, similar to Objective-C id.
Object is the root Class of The Objectively Class hierarchy.
int hash(const Object *self)
A location and length into contiguous collections.
ssize_t location
The location.