From 7cede97080221bc44531a8a68c81047b3a4af4d3 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 30 Jun 2015 10:30:20 -0400 Subject: [PATCH] Hide away tt_hash_node again --- treetrie.c | 4 +++- treetrie.h | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/treetrie.c b/treetrie.c index 61298fe..280a9ff 100644 --- a/treetrie.c +++ b/treetrie.c @@ -8,6 +8,8 @@ #include "treetrie.h" #include "fasthash.h" +typedef uint32_t tt_hash_t; + /* /\* Customized special-purpose fasthash variation *\/ */ /* #define mix(h) ({ \ */ /* (h) ^= (h) >> 23; \ */ @@ -54,7 +56,7 @@ static inline tt_hash_t hash(uint32_t tag, return x - (x >> 32); } -inline tt_hash_t tt_hash_node(tt_arena_t *a, tt_node_idx_t i) { +static inline tt_hash_t tt_hash_node(tt_arena_t *a, tt_node_idx_t i) { return hash(a->headers[i].inuse.tag, a->headers[i].inuse.index, a->nodes[i].a, diff --git a/treetrie.h b/treetrie.h index c9a90d7..80cbd85 100644 --- a/treetrie.h +++ b/treetrie.h @@ -79,10 +79,6 @@ extern tt_node_idx_t tt_arena_cons(tt_arena_t *a, extern tt_node_idx_t tt_grab(tt_arena_t *a, tt_node_idx_t i); extern void tt_drop(tt_arena_t *a, tt_node_idx_t i); -/* WARNING: private, unsafe */ -typedef uint32_t tt_hash_t; -extern tt_hash_t tt_hash_node(tt_arena_t *a, tt_node_idx_t i); - #ifdef __cplusplus } #endif