Add GI_TYPE_TAG_IS_BASIC

And deprecate G_TYPE_TAG_IS_BASIC. Let's avoid hijacking
the G namespace any further.
This commit is contained in:
Emmanuele Bassi 2022-02-13 14:33:10 +00:00
parent f7b0141906
commit 13f09c5594

View File

@ -45,8 +45,40 @@ G_BEGIN_DECLS
* @tag: a type tag
*
* Checks if @tag is a basic type.
*
* Deprecated: 1.72: Use GI_TYPE_TAG_IS_BASIC() instead
*/
#define G_TYPE_TAG_IS_BASIC(tag) (tag < GI_TYPE_TAG_ARRAY || tag == GI_TYPE_TAG_UNICHAR)
#define G_TYPE_TAG_IS_BASIC(tag) GI_TYPE_TAG_IS_BASIC(tag)
/**
* GI_TYPE_TAG_IS_BASIC
* @tag: a type tag
*
* Checks if @tag is a basic type.
*
* Since: 1.72
*/
#define GI_TYPE_TAG_IS_BASIC(tag) ((tag) < GI_TYPE_TAG_ARRAY || (tag) == GI_TYPE_TAG_UNICHAR)
/**
* GI_TYPE_TAG_IS_NUMERIC:
* @tag: a type tag
*
* Checks if @tag is a numeric type. That is, integer or floating point.
*
* Since: 1.72
*/
#define GI_TYPE_TAG_IS_NUMERIC(tag) ((tag) >= GI_TYPE_TAG_INT8 && (tag) <= GI_TYPE_TAG_DOUBLE)
/**
* GI_TYPE_TAG_IS_NUMERIC:
* @tag: a type tag
*
* Checks if @tag is a numeric type. That is, integer or floating point.
*
* Since: 1.72
*/
#define GI_TYPE_TAG_IS_NUMERIC(tag) ((tag) >= GI_TYPE_TAG_INT8 && (tag) <= GI_TYPE_TAG_DOUBLE)
/**
* GI_TYPE_TAG_IS_NUMERIC: