X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fhash.h;h=e4b149957050b2d015de73d3bdfd9f4c2ade4db1;hb=f8190b7233871b5b47c3fc8846731d1bbdef78a5;hp=c26e7acd66ee95e7980f89f73f88f0e443a1e744;hpb=6dfdb323612184529b4b83c1be914dda8262de47;p=tinc diff --git a/src/hash.h b/src/hash.h index c26e7acd..e4b14995 100644 --- a/src/hash.h +++ b/src/hash.h @@ -1,3 +1,6 @@ +#ifndef TINC_HASH_H +#define TINC_HASH_H + /* hash.h -- header file for hash.c Copyright (C) 2012 Guus Sliepen @@ -17,9 +20,6 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __TINC_HASH_H__ -#define __TINC_HASH_H__ - typedef struct hash_t { size_t n; size_t size; @@ -27,10 +27,11 @@ typedef struct hash_t { const void **values; } hash_t; -extern hash_t *hash_alloc(size_t n, size_t size) __attribute__ ((__malloc__)); +extern hash_t *hash_alloc(size_t n, size_t size) __attribute__((__malloc__)); extern void hash_free(hash_t *); extern void hash_insert(hash_t *, const void *key, const void *value); +extern void hash_delete(hash_t *, const void *key); extern void *hash_search(const hash_t *, const void *key); extern void *hash_search_or_insert(hash_t *, const void *key, const void *value); @@ -38,4 +39,4 @@ extern void *hash_search_or_insert(hash_t *, const void *key, const void *value) extern void hash_clear(hash_t *); extern void hash_resize(hash_t *, size_t n); -#endif /* __TINC_HASH_H__ */ +#endif