[glib/wip/otte/interface-types: 440/448] Use G_TYPE_INVALID instead of 0
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/otte/interface-types: 440/448] Use G_TYPE_INVALID instead of 0
- Date: Sat, 24 Oct 2020 03:35:48 +0000 (UTC)
commit 8cda2d922e9fe4864a7ac2790d70f5b7849c0125
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jul 12 15:16:33 2020 -0400
Use G_TYPE_INVALID instead of 0
This makes things more self-explanatory.
gobject/gtype.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gobject/gtype.c b/gobject/gtype.c
index c90cad2a8..8aa50ae59 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -1695,11 +1695,12 @@ g_type_interface_prerequisites (GType interface_type,
*
* Returns the instantiable prerequisite of an interface type.
*
- * If the interface type has no instantiable prerequisite, 0 is returned.
+ * If the interface type has no instantiable prerequisite,
+ * G_TYPE_INVALID is returned.
*
* Since: 2.64
*
- * Returns: the instantiable prerequisite type or 0 if none
+ * Returns: the instantiable prerequisite type or G_TYPE_INVALID if none
**/
GType
g_type_interface_instantiable_prerequisite (GType interface_type)
@@ -1712,7 +1713,7 @@ g_type_interface_instantiable_prerequisite (GType interface_type)
iface = lookup_type_node_I (interface_type);
if (iface == NULL)
- return 0;
+ return G_TYPE_INVALID;
G_READ_LOCK (&type_rw_lock);
@@ -1732,7 +1733,7 @@ g_type_interface_instantiable_prerequisite (GType interface_type)
if (inode)
return NODE_TYPE (inode);
else
- return 0;
+ return G_TYPE_INVALID;
}
static IFaceHolder*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]