1 /* tal/talloc can't implement tal_first/tal_next. */
3 static inline bool no_children(const void *ctx)
5 return talloc_total_blocks(ctx) == 1;
8 static inline bool single_child(const void *ctx, const void *child)
10 return talloc_total_blocks(ctx) == 2 && tal_parent(child) == ctx;
13 static inline bool no_children(const void *ctx)
15 return !tal_first(ctx);
18 static inline bool single_child(const void *ctx, const void *child)
20 return tal_first(ctx) == child && !tal_next(child) && !tal_first(child);