]> git.ozlabs.org Git - ccan/commit
lqueue: Streamline interface with TCON_CONTAINER
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 20 Oct 2015 04:12:55 +0000 (15:12 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sun, 25 Oct 2015 12:32:44 +0000 (23:32 +1100)
commit42b7ab487d38ac9753cc2fd3264f24082cff5b05
treec5a17e2209169fd5c9b8d48bb3307b9e5c8dd31c
parente47d78e9ca621d7b5f70ef2638c177f20ea7d88e
lqueue: Streamline interface with TCON_CONTAINER

The interfaces the lqueue module currently has implement (partial) type
safety in a somewhat clunky 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 queue object, so it no longer needs
to be explicitly passed to later calls.

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

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