/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/hash.h

  • Committer: Gustav Hartvigsson
  • Date: 2015-06-18 19:01:54 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150618190154-nd5ucxkx4b1ww5xh
* Finnished up s_map_add () ???

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 * A collection of hash functions.
14
14
 */
15
15
 
 
16
/**
 
17
 * A HashFunc is the type of function to use when you need to hash some
 
18
 * type of object.
 
19
 */
 
20
typedef hash_t (* HashFunc)(const spointer);
 
21
 
 
22
/**
 
23
 * Convinience macro to cast function.
 
24
 */
 
25
#define HASH_FUNC(f) (HashFunc)(f)
16
26
 
17
27
/**
18
28
 * this is the SDBM hash function from:
19
29
 * http://en.literateprograms.org/Hash_function_comparison_%28C,_sh%29
20
30
 */
21
 
hash_t sdbm_hash (const unsigned char *key);
 
31
hash_t sdbm_hash (const char * key);
22
32
 
 
33
hash_t s_hash_object (const spointer obj);
23
34
 
24
35
/* TODO: Make this settable via CMake. */
25
36
/**