projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Symlink README to README.md when running make dist.
[tinc]
/
src
/
hash.h
diff --git
a/src/hash.h
b/src/hash.h
index
30a15fb
..
1a6ce32
100644
(file)
--- 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 <guus@tinc-vpn.org>
/*
hash.h -- header file for hash.c
Copyright (C) 2012 Guus Sliepen <guus@tinc-vpn.org>
@@
-17,17
+20,16
@@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_HASH_H__
-#define __TINC_HASH_H__
+#include "system.h"
typedef struct hash_t {
size_t n;
size_t size;
typedef struct hash_t {
size_t n;
size_t size;
-
char
*keys;
+
uint8_t
*keys;
const void **values;
} 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_free(hash_t *);
extern void hash_insert(hash_t *, const void *key, const void *value);
@@
-39,4
+41,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);
extern void hash_clear(hash_t *);
extern void hash_resize(hash_t *, size_t n);
-#endif
/* __TINC_HASH_H__ */
+#endif