From faceb8960bf5a623a1af4ac876c964daa8fbab42 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 28 May 2014 10:59:14 +0200 Subject: [PATCH] gobject: Use fast fundamental instance type check Speeds up g_object_ref/_unref by 50%-65% (i.e. takes 60-65% of the time it used to take). https://bugzilla.gnome.org/show_bug.cgi?id=730984 --- gobject/gobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobject/gobject.h b/gobject/gobject.h index 28996ca77..a2f9af3d8 100644 --- a/gobject/gobject.h +++ b/gobject/gobject.h @@ -62,7 +62,7 @@ G_BEGIN_DECLS * * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT. */ -#define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_OBJECT)) +#define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE ((object), G_TYPE_OBJECT)) /** * G_IS_OBJECT_CLASS: * @class: a #GObjectClass