Browse Source Download (without any required ccan dependencies)

Module:

check_type

Summary:

routines for compile time type checking

Author:

Rusty Russell <rusty@rustcorp.com.au>

Dependencies:

Description:

C has fairly weak typing: ints get automatically converted to longs, signed to unsigned, etc. There are some cases where this is best avoided, and these macros provide methods for evoking warnings (or build errors) when a precise type isn't used.

On compilers which don't support typeof() these routines are less effective, since they have to use sizeof() which can only distiguish between types of different size.

License:

CC0 (Public domain)