Go to the source code of this file.
◆ __attribute__()
__attribute__ |
( |
(hot, pure) | | ) |
|
Definition at line 20 of file hash.c.
20 {
21 unsigned int h = 0;
22 const unsigned char *s;
23 for (s = (unsigned char *)s0; *s; ++s) h = h * 65599 + *s;
24 return h;
25}
◆ hdel()
void hdel |
( |
const Hash | h, |
|
|
void(*)(MemPool, void *) | func ) |
Definition at line 8 of file hash.c.
8 {
9 for (
unsigned int i = h->
size + 1; --i;) {
10 void *s = h->
table[i - 1];
11 if (s) {
13 h->
table[i - 1] = NULL;
14 }
15 }
16}
◆ hend()
void hend |
( |
const Hash | h | ) |
|
◆ hini()
Definition at line 3 of file hash.c.
3 {
4 h->
table = (
void *)
xcalloc(((nmemb + 3) & 0xfffffffc),
sizeof(
void *));
6}
static ANEW void * xcalloc(const m_uint n, const m_uint sz)