glib-aux: add nm_assert_is_bool() helper

This commit is contained in:
Thomas Haller 2021-09-08 16:44:05 +02:00
parent 2d828bdbf9
commit 398f6a8afb
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -18,6 +18,7 @@ typedef enum _nm_packed {
NM_OPTION_BOOL_TRUE = 1,
} NMOptionBool;
#define nm_assert_is_bool(value) nm_assert(NM_IN_SET((value), 0, 1))
#define nm_assert_is_ternary(value) nm_assert(NM_IN_SET((value), -1, 0, 1))
/*****************************************************************************/