]> git.ozlabs.org Git - ccan/commitdiff
tal: support destructors with an extra argument.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 29 Dec 2016 04:33:19 +0000 (15:03 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 29 Dec 2016 23:12:44 +0000 (09:42 +1030)
There are several times I've wanted an extra arg to the destructor, and had
to embed it in the thing destroyed.  It's more efficient to put it into
tal itself (since it allocates space anyway), but we make it conditional
on a flag to avoid bloating every destructor.

The infrastructure makes it easier to add an extra arg to the general
notifiers later if we want.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

No differences found