Typedefs | Functions

hash.h File Reference

Go to the source code of this file.

Typedefs

typedef struct hashtable hashtable
typedef void *(* ht_keycp )(void *)
typedef int(* ht_keyeq )(void *, void *)
typedef unsigned int(* ht_key2hash )(void *)

Functions

hashtableht_create (int size, ht_keycp cp, ht_keyeq eq, ht_key2hash hash)
hashtableht_create_d1 (int size)
hashtableht_create_d2 (int size)
hashtableht_create_str (int size)
void ht_destroy (hashtable *table)
void * ht_insert (hashtable *table, void *key, void *data)
void * ht_find (hashtable *table, void *key)
void * ht_delete (hashtable *table, void *key)
void ht_process (hashtable *table, void(*func)(void *))

Typedef Documentation

typedef struct hashtable hashtable

Definition at line 21 of file hash.h.

typedef unsigned int( * ht_key2hash)(void *)

Definition at line 33 of file hash.h.

typedef void*( * ht_keycp)(void *)

Definition at line 25 of file hash.h.

typedef int( * ht_keyeq)(void *, void *)

Definition at line 29 of file hash.h.


Function Documentation

hashtable* ht_create ( int  size,
ht_keycp  cp,
ht_keyeq  eq,
ht_key2hash  hash 
)

Definition at line 52 of file hash.c.

hashtable* ht_create_d1 ( int  size  ) 

Definition at line 394 of file hash.c.

hashtable* ht_create_d2 ( int  size  ) 

Definition at line 399 of file hash.c.

hashtable* ht_create_str ( int  size  ) 

Definition at line 404 of file hash.c.

void* ht_delete ( hashtable table,
void *  key 
)

Definition at line 231 of file hash.c.

void ht_destroy ( hashtable table  ) 

Definition at line 100 of file hash.c.

void* ht_find ( hashtable table,
void *  key 
)

Definition at line 208 of file hash.c.

void* ht_insert ( hashtable table,
void *  key,
void *  data 
)

Definition at line 133 of file hash.c.

void ht_process ( hashtable table,
void(*)(void *)  func 
)

Definition at line 288 of file hash.c.