X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftcon%2Ftcon.h;fp=ccan%2Ftcon%2Ftcon.h;h=62bacf537b4261e2095fa59b35e0be51df7ff981;hb=cc3db07ecc15f3e1e556387d82318697956e8e0c;hp=a256f1031486513e6c5057f0ef918170701223ea;hpb=43992de4769085b3aba0fd9c167a85ad14e771d2;p=ccan diff --git a/ccan/tcon/tcon.h b/ccan/tcon/tcon.h index a256f103..62bacf53 100644 --- a/ccan/tcon/tcon.h +++ b/ccan/tcon/tcon.h @@ -159,6 +159,13 @@ #define tcon_type(x, canary) void * #endif +/** + * tcon_sizeof - the size of type within a container + * @x: the structure containing the TCON. + * @canary: which canary to check against. + */ +#define tcon_sizeof(x, canary) sizeof((x)->_tcon[0].canary) + /** * tcon_ptr_type - pointer to the type within a container (or void *) * @x: the structure containing the TCON.