wire/wire_io: support take() arg to io_write_wire().

This simplifies memory management, but means we have to keep the
original pointer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-03-10 21:15:42 +10:30
parent cd62b74b1c
commit df7b68eea9
2 changed files with 15 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ struct io_plan *io_read_wire_(struct io_conn *conn,
(next), (arg), struct io_conn *), \
(arg))
/* Write message from data (tal_count(data) gives length). */
/* Write message from data (tal_count(data) gives length). data can be take() */
struct io_plan *io_write_wire_(struct io_conn *conn,
const u8 *data,
struct io_plan *(*next)(struct io_conn *, void *),