[master] 52a745b Reduce struct storage visibility.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Sep 15 11:22:26 CEST 2014
commit 52a745bc8617f60c2a00c83fdcf9a7cb874b8465
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Sep 15 09:21:56 2014 +0000
Reduce struct storage visibility.
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index c76f7c1..7373815 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -384,22 +384,6 @@ struct lru {
unsigned n_objcore;
};
-/* Storage -----------------------------------------------------------*/
-
-struct storage {
- unsigned magic;
-#define STORAGE_MAGIC 0x1a4e51c0
-
-
- VTAILQ_ENTRY(storage) list;
- struct stevedore *stevedore;
- void *priv;
-
- unsigned char *ptr;
- unsigned len;
- unsigned space;
-};
-
/* Stored object -----------------------------------------------------
* Pointer to a stored object, and the methods it supports
*/
diff --git a/bin/varnishd/cache/cache_cli.c b/bin/varnishd/cache/cache_cli.c
index 77a041c..9e1fa4e 100644
--- a/bin/varnishd/cache/cache_cli.c
+++ b/bin/varnishd/cache/cache_cli.c
@@ -48,6 +48,7 @@
#include "vcli_common.h"
#include "vcli_priv.h"
#include "vcli_serve.h"
+#include "storage/storage.h" // struct storage
pthread_t cli_thread;
static struct lock cli_mtx;
diff --git a/bin/varnishd/cache/cache_req_body.c b/bin/varnishd/cache/cache_req_body.c
index 6c96f74..d39c51a 100644
--- a/bin/varnishd/cache/cache_req_body.c
+++ b/bin/varnishd/cache/cache_req_body.c
@@ -35,6 +35,7 @@
#include "cache.h"
#include "vtim.h"
+#include "storage/storage.h"
/*----------------------------------------------------------------------
* Iterate over the req.body.
diff --git a/bin/varnishd/storage/storage.h b/bin/varnishd/storage/storage.h
index 1f83998..5dda954 100644
--- a/bin/varnishd/storage/storage.h
+++ b/bin/varnishd/storage/storage.h
@@ -39,6 +39,23 @@ struct objcore;
struct worker;
struct lru;
+/* Storage -----------------------------------------------------------*/
+
+struct storage {
+ unsigned magic;
+#define STORAGE_MAGIC 0x1a4e51c0
+
+
+ VTAILQ_ENTRY(storage) list;
+ struct stevedore *stevedore;
+ void *priv;
+
+ unsigned char *ptr;
+ unsigned len;
+ unsigned space;
+};
+
+
typedef void storage_init_f(struct stevedore *, int ac, char * const *av);
typedef void storage_open_f(const struct stevedore *);
typedef struct storage *storage_alloc_f(struct stevedore *, size_t size);
More information about the varnish-commit
mailing list