]> git.ozlabs.org Git - ccan/commit
lstack: Streamline interface with TCON_CONTAINER
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 20 Oct 2015 03:34:02 +0000 (14:34 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sun, 25 Oct 2015 12:32:44 +0000 (23:32 +1100)
commite47d78e9ca621d7b5f70ef2638c177f20ea7d88e
treedf9049abd752bf1f22714203080c02a014ca914d
parent0ddea4131eca28437638cdaf9394324fafab33da
lstack: Streamline interface with TCON_CONTAINER

The interfaces the lstack module currently has implement (partial) type
safety in a somewhat clunk way - types and member names need to be passed
to a number of entry points.

This patch uses the new TCON_CONTAINER magic to stash the typing
information into the declaration of the stack object, so it no longer needs
to be explicitly passed to later calls.

This does alter the lstack interface incompatibly.  I think the module
is young enough that we can reasonably do that.  One other module,
'aga', was using lstack, and this also includes fixes so that it still
works.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/aga/dfs.c
ccan/lstack/_info
ccan/lstack/lstack.h
ccan/lstack/test/run.c