From: Ian Jackson Date: Thu, 25 Jul 2013 17:30:46 +0000 (+0100) Subject: unaligned.h: rationalise; provide buf_append_uint8 et al X-Git-Tag: debian/0.3.0_beta2~38 X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/commitdiff_plain/993db2a680648967ff59128c1aa003b9e87c6824?hp=993db2a680648967ff59128c1aa003b9e87c6824 unaligned.h: rationalise; provide buf_append_uint8 et al Replace the formulaic macros buf_{,un}{append,prepend}_{uint32,uint16} with some macro-generated inline functions. These have better typechecking, and are also better because it's not possible to accidentally mess up one of the definitions by failing to permute it in the right way. Add the functions for uint8 too. This involves providing put_uint8 and get_uint8 macros, which we do along the lines of the existing put_ and get_ macros. Use the new uint8 function in the one place where it's currently useful. More call sites will appear shortly. Signed-off-by: Ian Jackson ---