| 21 | } |
| 22 | |
| 23 | struct onionreply *dup_onionreply(const tal_t *ctx, |
| 24 | const struct onionreply *r TAKES) |
| 25 | { |
| 26 | struct onionreply *n; |
| 27 | |
| 28 | if (taken(r)) |
| 29 | return cast_const(struct onionreply *, tal_steal(ctx, r)); |
| 30 | |
| 31 | n = tal(ctx, struct onionreply); |
| 32 | n->contents = tal_dup_talarr(n, u8, r->contents); |
| 33 | return n; |
| 34 | } |
| 35 | |
| 36 | struct onionreply *new_onionreply(const tal_t *ctx, const u8 *contents TAKES) |
| 37 | { |
no test coverage detected