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
parent f782b2f9
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment