From 5e08d524c31d886954b3d792e4b86eaa1ea7b824 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 31 Aug 2005 19:13:26 +0000 Subject: [PATCH] Intern the name here, since we need the quark anyway when sending change 2005-08-31 Matthias Clasen * gparam.c (g_param_spec_internal): Intern the name here, since we need the quark anyway when sending change notification. --- gobject/gparam.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gobject/gparam.c b/gobject/gparam.c index 3174715c3..6bbeb7143 100644 --- a/gobject/gparam.c +++ b/gobject/gparam.c @@ -291,6 +291,7 @@ g_param_spec_internal (GType param_type, GParamFlags flags) { GParamSpec *pspec; + gchar *tmp; g_return_val_if_fail (G_TYPE_IS_PARAM (param_type) && param_type != G_TYPE_PARAM, NULL); g_return_val_if_fail (name != NULL, NULL); @@ -300,11 +301,12 @@ g_param_spec_internal (GType param_type, pspec = (gpointer) g_type_create_instance (param_type); if ((flags & G_PARAM_STATIC_NAME)) - pspec->name = (gchar *) name; + pspec->name = g_intern_static_string (name); else { - pspec->name = g_strdup (name); - canonicalize_key (pspec->name); + tmp = g_strdup (name); + canonicalize_key (tmp); + pspec->name = g_intern_string (tmp); } if (flags & G_PARAM_STATIC_NICK)