[glib] gtype: Fast-path for g_type_is_a
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gtype: Fast-path for g_type_is_a
- Date: Fri, 8 Aug 2014 09:20:37 +0000 (UTC)
commit 3e2735f4680b9f46548e7d039b0241cd24aee162
Author: Edward Hervey <bilboed bilboed com>
Date: Mon Jun 23 11:39:04 2014 +0200
gtype: Fast-path for g_type_is_a
Do I really need to explain why ?
https://bugzilla.gnome.org/show_bug.cgi?id=732085
gobject/gtype.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gobject/gtype.c b/gobject/gtype.c
index f766ffd..dff5b4a 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -3499,6 +3499,9 @@ g_type_is_a (GType type,
{
TypeNode *node, *iface_node;
gboolean is_a;
+
+ if (type == iface_type)
+ return TRUE;
node = lookup_type_node_I (type);
iface_node = lookup_type_node_I (iface_type);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]