[master] ed13c9f24 rename `OBJ_ITER_FINAL` to `OBJ_ITER_END` for clarity
Nils Goroll
nils.goroll at uplex.de
Wed Oct 7 08:34:06 UTC 2020
commit ed13c9f24e60627b356d27f23f6548e4a44515df
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed Oct 7 10:27:45 2020 +0200
rename `OBJ_ITER_FINAL` to `OBJ_ITER_END` for clarity
We use the `final` argument in object iteration to denote
`OC_F_PRIVATE | OC_F_HFM | OC_F_HFP`.
As we now have `VDP_END` to mark the final bit of data, so should the
iterator flag be named `_END`. This also parallels `VDP_FLUSH` vs.
`OBJ_ITER_FLUSH`.
Supported by martin
Ref #3298
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 215ed8759..fc4d5c71d 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -710,7 +710,7 @@ const void *ObjGetAttr(struct worker *, struct objcore *, enum obj_attr,
typedef int objiterate_f(void *priv, unsigned flush,
const void *ptr, ssize_t len);
#define OBJ_ITER_FLUSH 0x01
-#define OBJ_ITER_FINAL 0x02
+#define OBJ_ITER_END 0x02
int ObjIterate(struct worker *, struct objcore *,
void *priv, objiterate_f *func, int final);
diff --git a/bin/varnishd/storage/storage_simple.c b/bin/varnishd/storage/storage_simple.c
index 231a50d6b..ccba6b525 100644
--- a/bin/varnishd/storage/storage_simple.c
+++ b/bin/varnishd/storage/storage_simple.c
@@ -261,7 +261,7 @@ sml_iterator(struct worker *wrk, struct objcore *oc,
VTAILQ_FOREACH_SAFE(st, &obj->list, list, checkpoint) {
u = 0;
if (VTAILQ_NEXT(st, list) == NULL)
- u |= OBJ_ITER_FINAL;
+ u |= OBJ_ITER_END;
if (final)
u |= OBJ_ITER_FLUSH;
if (ret == 0 && st->len > 0)
More information about the varnish-commit
mailing list