+#ifndef MESHLINK_SPLAY_TREE_H
+#define MESHLINK_SPLAY_TREE_H
+
/*
splay_tree.h -- header file for splay_tree.c
- Copyright (C) 2014 Guus Sliepen <guus@meshlink.io>
+ Copyright (C) 2014, 2017 Guus Sliepen <guus@meshlink.io>
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
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
-#ifndef __SPLAY_TREE_H__
-#define __SPLAY_TREE_H__
-
typedef struct splay_node_t {
/* Linked list part */
splay_compare_t compare;
splay_action_t delete;
- int count;
+ unsigned int count;
} splay_tree_t;
/* (De)constructors */
-extern splay_tree_t *splay_alloc_tree(splay_compare_t, splay_action_t) __attribute__ ((__malloc__));
+extern splay_tree_t *splay_alloc_tree(splay_compare_t, splay_action_t) __attribute__((__malloc__));
extern void splay_free_tree(splay_tree_t *);
-extern splay_node_t *splay_alloc_node(void) __attribute__ ((__malloc__));
+extern splay_node_t *splay_alloc_node(void) __attribute__((__malloc__));
extern void splay_free_node(splay_tree_t *tree, splay_node_t *);
/* Insertion and deletion */