MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / hash

Function hash

extern/btyacc/symtab.c:15–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14
15int hash(char *name)
16{
17 register char *s;
18 register int c, k;
19
20 assert(name && *name);
21 s = name;
22 k = *s;
23 while ((c = *++s))
24 k = (31*k + c) & (TABLE_SIZE - 1);
25
26 return (k);
27}
28
29
30bucket *make_bucket(char *name)

Callers 2

lookupFunction · 0.70
create_symbol_tableFunction · 0.70

Calls 1

assertClass · 0.85

Tested by

no test coverage detected