Provide private G_SIGNEDNESS_OF macro in glib-private.h

Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
Simon McVittie
2024-05-15 12:51:48 +01:00
committed by Philip Withnall
parent 7c41a6529b
commit a0ed94a11d
3 changed files with 17 additions and 11 deletions

View File

@@ -25,6 +25,16 @@
#include "gstdioprivate.h"
#include "gdatasetprivate.h"
/*
* G_SIGNEDNESS_OF:
* @T: a numeric type such as `unsigned int`
*
* An integer constant expression indicating whether @T is a signed type.
*
* Returns: 1 if @T is signed, 0 if it is unsigned
*/
#define G_SIGNEDNESS_OF(T) (((T) -1) <= 0)
/* gcc defines __SANITIZE_ADDRESS__, clang sets the address_sanitizer
* feature flag.
*