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