[glib] Speed up property change notification a bit
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Speed up property change notification a bit
- Date: Tue, 8 Sep 2015 00:58:22 +0000 (UTC)
commit 00933dfc9cc525963c6833d3180b593a87bb15bb
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Sep 7 20:56:10 2015 -0400
Speed up property change notification a bit
Avoid the quark lock and hash table lookup for every
emission of ::notify.
gobject/gobject.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index 89ad66f..ac0fa18 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -1050,7 +1050,6 @@ g_object_finalize (GObject *object)
#endif /* G_ENABLE_DEBUG */
}
-
static void
g_object_dispatch_properties_changed (GObject *object,
guint n_pspecs,
@@ -1059,7 +1058,7 @@ g_object_dispatch_properties_changed (GObject *object,
guint i;
for (i = 0; i < n_pspecs; i++)
- g_signal_emit (object, gobject_signals[NOTIFY], g_quark_from_string (pspecs[i]->name), pspecs[i]);
+ g_signal_emit (object, gobject_signals[NOTIFY], g_param_spec_get_name_quark (pspecs[i]), pspecs[i]);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]