From d9ee53d0ebf8f7a4b012c59680e3bb969724c5e1 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 18 Mar 2024 10:46:13 +0000 Subject: [PATCH] girparser: Add a pseudo-doc-comment for signedness() We could consider adding this to gmacros if it's useful anywhere else. Signed-off-by: Simon McVittie --- girepository/girparser.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/girepository/girparser.c b/girepository/girparser.c index ca736c8ee..c80574f3f 100644 --- a/girepository/girparser.c +++ b/girepository/girparser.c @@ -454,6 +454,12 @@ typedef struct { unsigned int is_signed : 1; } IntegerAliasInfo; +/* + * signedness: + * @T: a numeric type + * + * Returns: 1 if @T is signed, 0 if it is unsigned + */ #define signedness(T) (((T) -1) <= 0) G_STATIC_ASSERT (signedness (int) == 1); G_STATIC_ASSERT (signedness (unsigned int) == 0);