[gobject-introspection/ebassi/no-docbook] Add GI_TYPE_TAG_IS_BASIC



commit 1eea2ea3f2b086bdb028b232f98cfe3862b2b1f4
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sun Feb 13 14:33:10 2022 +0000

    Add GI_TYPE_TAG_IS_BASIC
    
    And deprecate G_TYPE_TAG_IS_BASIC. Let's avoid hijacking
    the G namespace any further.

 girepository/gitypeinfo.h | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)
---
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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]