mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-29 13:23:31 +02:00
gtype: Add check for fundamental instance type
When checking whether an instance is of a given fundamental type (such as G_TYPE_OBJECT), we can avoid over 60%+ of the cost of checking types. https://bugzilla.gnome.org/show_bug.cgi?id=730984
This commit is contained in:
committed by
Ryan Lortie
parent
03a48e1ade
commit
6072e3650f
@@ -34,6 +34,7 @@ G_TYPE_CLASS_GET_PRIVATE
|
||||
G_TYPE_CHECK_INSTANCE
|
||||
G_TYPE_CHECK_INSTANCE_CAST
|
||||
G_TYPE_CHECK_INSTANCE_TYPE
|
||||
G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE
|
||||
G_TYPE_CHECK_CLASS_CAST
|
||||
G_TYPE_CHECK_CLASS_TYPE
|
||||
G_TYPE_CHECK_VALUE
|
||||
@@ -125,6 +126,7 @@ G_TYPE_FUNDAMENTAL_SHIFT
|
||||
g_type_check_instance
|
||||
g_type_check_instance_cast
|
||||
g_type_check_instance_is_a
|
||||
g_type_check_instance_is_fundamentally_a
|
||||
g_type_check_class_cast
|
||||
g_type_check_class_is_a
|
||||
g_type_check_is_value_type
|
||||
|
Reference in New Issue
Block a user