hash.h
/*
* hash.h
*
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
* 2003 Bastian Blank <waldi@debian.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEBIAN_INSTALLER__HASH_H
#define DEBIAN_INSTALLER__HASH_H
#include <debian-installer/types.h>
di_equal_func di_rstring_equal;
di_hash_func di_rstring_hash;
#if 0
di_equal_func di_string_equal;
di_hash_func di_string_hash;
#endif
typedef struct di_hash_table di_hash_table;
di_hash_table *di_hash_table_new (di_hash_func hash_func, di_equal_func key_equal_func);
di_hash_table *di_hash_table_new_full (di_hash_func hash_func, di_equal_func key_equal_func, di_destroy_notify key_destroy_func, di_destroy_notify value_destroy_func);
void di_hash_table_destroy (di_hash_table *hash_table);
void di_hash_table_insert (di_hash_table *hash_table, void *key, void *value);
void *di_hash_table_lookup (di_hash_table *hash_table, const void *key);
void di_hash_table_foreach (di_hash_table *hash_table, di_hfunc *func, void *user_data);
di_ksize_t di_hash_table_size (di_hash_table *hash_table);
#endif
di_hash_table_lookup
void * di_hash_table_lookup(di_hash_table *hash_table, const void *key)
Definition hash.c:169
di_hash_table_size
di_ksize_t di_hash_table_size(di_hash_table *hash_table)
Definition hash.c:256
di_hash_table_destroy
void di_hash_table_destroy(di_hash_table *hash_table)
Definition hash.c:134
di_hash_table_new_full
di_hash_table * di_hash_table_new_full(di_hash_func hash_func, di_equal_func key_equal_func, di_destroy_notify key_destroy_func, di_destroy_notify value_destroy_func)
Definition hash.c:113
di_hash_table_insert
void di_hash_table_insert(di_hash_table *hash_table, void *key, void *value)
Definition hash.c:178
di_hash_table_new
di_hash_table * di_hash_table_new(di_hash_func hash_func, di_equal_func key_equal_func)
Definition hash.c:108
di_hash_table_foreach
void di_hash_table_foreach(di_hash_table *hash_table, di_hfunc *func, void *user_data)
Definition hash.c:246
di_ksize_t
uint32_t di_ksize_t
Definition types.h:78
di_equal_func
bool di_equal_func(const void *key1, const void *key2)
Definition types.h:45
di_hash_func
uint32_t di_hash_func(const void *key)
Definition types.h:56
di_destroy_notify
void di_destroy_notify(void *data)
Definition types.h:50
di_hash_table
Hash table.
Definition hash.c:42
di_hash_table::key_destroy_func
di_destroy_notify * key_destroy_func
Definition hash.c:49
di_hash_table::key_equal_func
di_equal_func * key_equal_func
Definition hash.c:48
di_hash_table::hash_func
di_hash_func * hash_func
Definition hash.c:47
di_hash_table::value_destroy_func
di_destroy_notify * value_destroy_func
Definition hash.c:50