diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2022-02-13 14:33:10 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2022-02-13 14:33:10 +0000 |
commit | 1eea2ea3f2b086bdb028b232f98cfe3862b2b1f4 (patch) | |
tree | 1d74e21f0c429e9ce92fa0a93598be0c79d2a3ad /girepository | |
parent | cd19bfad89f6a0e69dd830672139bc6e9899ea28 (diff) | |
download | gobject-introspection-1eea2ea3f2b086bdb028b232f98cfe3862b2b1f4.tar.gz |
Add GI_TYPE_TAG_IS_BASIC
And deprecate G_TYPE_TAG_IS_BASIC. Let's avoid hijacking
the G namespace any further.
Diffstat (limited to 'girepository')
-rw-r--r-- | girepository/gitypeinfo.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/girepository/gitypeinfo.h b/girepository/gitypeinfo.h index a8674fd9..39912ae7 100644 --- a/girepository/gitypeinfo.h +++ b/girepository/gitypeinfo.h @@ -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: |