equal
deleted
inserted
replaced
1 --- APC-3.0.19/apc_cache.c.ORIG Mon Feb 9 07:35:10 2009 |
|
2 +++ APC-3.0.19/apc_cache.c Mon Feb 9 07:35:21 2009 |
|
3 @@ -62,23 +62,9 @@ |
|
4 /* }}} */ |
|
5 |
|
6 /* {{{ string_nhash_8 */ |
|
7 -static unsigned int string_nhash_8(const char *s, size_t len) |
|
8 +static inline unsigned long string_nhash_8(const char *s, size_t len) |
|
9 { |
|
10 - register const unsigned int *iv = (const unsigned int *)s; |
|
11 - register unsigned int h = 0; |
|
12 - register const unsigned int *e = (const unsigned int *)(s + len - (len % sizeof(unsigned int))); |
|
13 - |
|
14 - for(;iv<e;iv++) { |
|
15 - h += *iv; |
|
16 - h = (h << 7) | (h >> ((8*sizeof(unsigned int)) - 7)); |
|
17 - } |
|
18 - s = (const char *)iv; |
|
19 - for(len %= sizeof(unsigned int);len;len--) { |
|
20 - h += *(s++); |
|
21 - } |
|
22 - h ^= (h >> 13); |
|
23 - h ^= (h >> 7); |
|
24 - return h; |
|
25 + return zend_inline_hash_func(s, len); |
|
26 } |
|
27 /* }}} */ |
|
28 |
|