mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
27 lines
623 B
C
27 lines
623 B
C
/*
|
|
* tools/lib/datastruct/hash.h
|
|
*
|
|
* Copyright (C) 2001 Sistina Software
|
|
*
|
|
* This file is released under the GPL.
|
|
*/
|
|
|
|
#ifndef HASH_H
|
|
#define HASH_H
|
|
|
|
struct hash_table;
|
|
typedef void (*iterate_fn)(void *data);
|
|
|
|
struct hash_table *create_hash_table(unsigned size_hint);
|
|
void destroy_hash_table(struct hash_table *t);
|
|
|
|
char *hash_lookup(struct hash_table *t, const char *key);
|
|
void hash_insert(struct hash_table *t, const char *key, void *data);
|
|
void hash_remove(struct hash_table *t, const char *key);
|
|
|
|
unsigned hash_get_num_entries(struct hash_table *t);
|
|
void hash_iterate(struct hash_table *t, iterate_fn f);
|
|
|
|
#endif
|
|
|