projects
/
platform
/
upstream
/
rpm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Sanitize python object -> tag number exception handling
[platform/upstream/rpm.git]
/
lib
/
rpmhash.c
1
/**
2
* \file lib/rpmhash.c
3
* Hash table implemenation
4
*/
5
6
#include "lib/rpmhash.h"
7
8
9
unsigned int hashFunctionString(const char * string) {
10
/* Jenkins One-at-a-time hash */
11
12
unsigned int hash = 0xe4721b68;
13
14
while (*string != '\0') {
15
hash += *string;
16
hash += (hash << 10);
17
hash ^= (hash >> 6);
18
string++;
19
}
20
hash += (hash << 3);
21
hash ^= (hash >> 11);
22
hash += (hash << 15);
23
return hash;
24
}