From 4ef08548ccaa44116d009566942624f611cb4681 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 22 Jan 2024 22:43:40 +0100 Subject: [PATCH] lib/must_be.h: is_same_type(): Add macro Signed-off-by: Alejandro Colomar --- lib/must_be.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/must_be.h b/lib/must_be.h index 62484916..a7365cba 100644 --- a/lib/must_be.h +++ b/lib/must_be.h @@ -90,7 +90,8 @@ */ -#define is_same_typeof(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) +#define is_same_type(a, b) __builtin_types_compatible_p(a, b) +#define is_same_typeof(a, b) is_same_type(typeof(a), typeof(b)) #define is_array(a) (!is_same_typeof((a), &(a)[0])) #define must_be_array(a) must_be(is_array(a))