tal: add TAL_TAKE.
authorRusty Russell <rusty@rustcorp.com.au>
Sun, 18 Nov 2012 03:37:35 +0000 (14:07 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Sun, 18 Nov 2012 04:28:54 +0000 (14:58 +1030)
commit5bdda8409e559d1b3485639ed43d3b69e4c3fa62
tree0c6a331cc87e71fd68ad8958d2bb83854ffa5aa2
parent0e34459a02e2615f50bac2767c7dce6632470946
tal: add TAL_TAKE.

TAL_TAKE provides a magic context meaning "consume my args and return
a replacement".  This is useful for writing convenience functions,
though not so useful in the standard routines here.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/tal/tal.c
ccan/tal/tal.h
ccan/tal/test/run-take.c [new file with mode: 0644]