[master] 6b04b7da6 hash: Move enum lookup_e to cache_objhead.h

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Dec 4 17:55:07 UTC 2023


commit 6b04b7da656b7baceaa41a9e5aab1a4741979a35
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Oct 2 13:35:49 2023 +0200

    hash: Move enum lookup_e to cache_objhead.h
    
    It has nothing to do with the hash lookup implementation, this is the
    outcome of a cache lookup.

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 027b617f5..55c14f1d4 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -34,7 +34,6 @@
 #include "cache_varnishd.h"
 #include "cache_filter.h"
 #include "cache_objhead.h"
-#include "hash/hash_slinger.h"
 #include "storage/storage.h"
 #include "vcl.h"
 #include "vtim.h"
diff --git a/bin/varnishd/cache/cache_objhead.h b/bin/varnishd/cache/cache_objhead.h
index bc1782379..58b536502 100644
--- a/bin/varnishd/cache/cache_objhead.h
+++ b/bin/varnishd/cache/cache_objhead.h
@@ -56,6 +56,15 @@ struct objhead {
 #define hoh_head _u.n.u_n_hoh_head
 };
 
+enum lookup_e {
+	HSH_MISS,
+	HSH_HITMISS,
+	HSH_HITPASS,
+	HSH_HIT,
+	HSH_GRACE,
+	HSH_BUSY,
+};
+
 void HSH_Fail(struct objcore *);
 void HSH_Kill(struct objcore *);
 void HSH_Insert(struct worker *, const void *hash, struct objcore *,
diff --git a/bin/varnishd/cache/cache_req_body.c b/bin/varnishd/cache/cache_req_body.c
index bca871765..3cbd62734 100644
--- a/bin/varnishd/cache/cache_req_body.c
+++ b/bin/varnishd/cache/cache_req_body.c
@@ -41,7 +41,6 @@
 
 #include "vtim.h"
 #include "storage/storage.h"
-#include "hash/hash_slinger.h"
 
 /*----------------------------------------------------------------------
  * Pull the req.body in via/into a objcore
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index c0508cd4c..aa0a0db98 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -46,7 +46,6 @@
 #include "cache_transport.h"
 #include "vcc_interface.h"
 
-#include "hash/hash_slinger.h"
 #include "http1/cache_http1.h"
 #include "storage/storage.h"
 #include "vcl.h"
diff --git a/bin/varnishd/hash/hash_slinger.h b/bin/varnishd/hash/hash_slinger.h
index c73147544..1f0e980a7 100644
--- a/bin/varnishd/hash/hash_slinger.h
+++ b/bin/varnishd/hash/hash_slinger.h
@@ -51,15 +51,6 @@ struct hash_slinger {
 	hash_deref_f		*deref;
 };
 
-enum lookup_e {
-	HSH_MISS,
-	HSH_BUSY,
-	HSH_HIT,
-	HSH_HITMISS,
-	HSH_HITPASS,
-	HSH_GRACE
-};
-
 /* mgt_hash.c */
 void HSH_config(const char *);
 


More information about the varnish-commit mailing list