gvalue: New g_value_init_from_instance

Used for the commonly used case (in signal emission) where we
initialize and set a GValue for an instance

Includes a fast-path for GObject

Overall makes it 6 times faster than the previous combination
of g_value_init + g_value_set_instance

Makes signal emission around 10% faster

https://bugzilla.gnome.org/show_bug.cgi?id=731950
This commit is contained in:
Edward Hervey
2014-06-19 11:28:48 +02:00
committed by Ryan Lortie
parent f727c820b8
commit c5c3c320a2
4 changed files with 71 additions and 4 deletions

View File

@@ -438,6 +438,7 @@ g_value_init
g_value_copy
g_value_reset
g_value_unset
g_value_init_from_instance
g_value_set_instance
g_value_fits_pointer
g_value_peek_pointer