order: Scalar comparison functions
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 2 Jun 2015 07:30:58 +0000 (17:30 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 18 Jun 2015 09:26:40 +0000 (19:26 +1000)
commit37825438b65879dad1a343b45bb5ce9fc37ba8e7
tree4942a9b55a4db1f2b0863e5314c8f117171a43fe
parentc2a3098b254830f33e800bfa398882786632631e
order: Scalar comparison functions

Extend the order module to provide simple, standard, comparison
callbacks for scalar types (i.e. integer and floating point types).

In addition to the usual variants comparing a plain scalar, this also
provides helper macros to construct a suitably typed callback and context
pointer to order structures by a specified scalar field.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/order/_info
ccan/order/order.c [new file with mode: 0644]
ccan/order/order.h
ccan/order/test/api.c [new file with mode: 0644]
ccan/priority_queue/test/run.c [new file with mode: 0644]