X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fhash.h;h=b28dc977f49a252401999274bb44a97d35a59b01;hb=4b6c01b1d5383b1a7417244a31ad4652aab2d5db;hp=578bfdb5876bacbc8a30c6bc4fa7a7c21d934820;hpb=fb7b6e7a0c966a88a682f656ca1caeb9a0583c5b;p=meshlink diff --git a/src/hash.h b/src/hash.h index 578bfdb5..b28dc977 100644 --- a/src/hash.h +++ b/src/hash.h @@ -1,6 +1,9 @@ +#ifndef MESHLINK_HASH_H +#define MESHLINK_HASH_H + /* hash.h -- header file for hash.c - Copyright (C) 2014 Guus Sliepen + Copyright (C) 2014, 2017 Guus Sliepen 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 @@ -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,15 +27,15 @@ typedef struct hash_t { const void **values; } hash_t; -extern hash_t *hash_alloc(size_t n, size_t size) __attribute__ ((__malloc__)); -extern void hash_free(hash_t *); +hash_t *hash_alloc(size_t n, size_t size) __attribute__((__malloc__)); +void hash_free(hash_t *); -extern void hash_insert(hash_t *, const void *key, const void *value); +void hash_insert(hash_t *, const void *key, const void *value); -extern void *hash_search(const hash_t *, const void *key); -extern void *hash_search_or_insert(hash_t *, const void *key, const void *value); +void *hash_search(const hash_t *, const void *key); +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); +void hash_clear(hash_t *); +void hash_resize(hash_t *, size_t n); -#endif /* __TINC_HASH_H__ */ +#endif