CLEANUP: pools: rename all pool functions and pointers to remove this "2"
During the migration to the second version of the pools, the new
functions and pool pointers were all called "pool_something2()" and
"pool2_something". Now there's no more pool v1 code and it's a real
pain to still have to deal with this. Let's clean this up now by
removing the "2" everywhere, and by renaming the pool heads
"pool_head_something".
diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c
index b3b0fbd..b93ff69 100644
--- a/src/flt_http_comp.c
+++ b/src/flt_http_comp.c
@@ -34,7 +34,7 @@
/* Pools used to allocate comp_state structs */
-static struct pool_head *pool2_comp_state = NULL;
+static struct pool_head *pool_head_comp_state = NULL;
static THREAD_LOCAL struct buffer *tmpbuf = &buf_empty;
static THREAD_LOCAL struct buffer *zbuf = &buf_empty;
@@ -91,7 +91,7 @@
if (filter->ctx == NULL) {
struct comp_state *st;
- st = pool_alloc_dirty(pool2_comp_state);
+ st = pool_alloc_dirty(pool_head_comp_state);
if (st == NULL)
return -1;
@@ -124,7 +124,7 @@
/* release any possible compression context */
if (st->comp_algo)
st->comp_algo->end(&st->comp_ctx);
- pool_free2(pool2_comp_state, st);
+ pool_free(pool_head_comp_state, st);
filter->ctx = NULL;
end:
return 1;
@@ -999,5 +999,5 @@
cfg_register_keywords(&cfg_kws);
flt_register_keywords(&filter_kws);
sample_register_fetches(&sample_fetch_keywords);
- pool2_comp_state = create_pool("comp_state", sizeof(struct comp_state), MEM_F_SHARED);
+ pool_head_comp_state = create_pool("comp_state", sizeof(struct comp_state), MEM_F_SHARED);
}