mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-09 18:54:04 +02:00
Intern the name here, since we need the quark anyway when sending change
2005-08-31 Matthias Clasen <mclasen@redhat.com> * gparam.c (g_param_spec_internal): Intern the name here, since we need the quark anyway when sending change notification.
This commit is contained in:
committed by
Matthias Clasen
parent
63b1b0c187
commit
5e08d524c3
@@ -291,6 +291,7 @@ g_param_spec_internal (GType param_type,
|
|||||||
GParamFlags flags)
|
GParamFlags flags)
|
||||||
{
|
{
|
||||||
GParamSpec *pspec;
|
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 (G_TYPE_IS_PARAM (param_type) && param_type != G_TYPE_PARAM, NULL);
|
||||||
g_return_val_if_fail (name != NULL, 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);
|
pspec = (gpointer) g_type_create_instance (param_type);
|
||||||
|
|
||||||
if ((flags & G_PARAM_STATIC_NAME))
|
if ((flags & G_PARAM_STATIC_NAME))
|
||||||
pspec->name = (gchar *) name;
|
pspec->name = g_intern_static_string (name);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pspec->name = g_strdup (name);
|
tmp = g_strdup (name);
|
||||||
canonicalize_key (pspec->name);
|
canonicalize_key (tmp);
|
||||||
|
pspec->name = g_intern_string (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & G_PARAM_STATIC_NICK)
|
if (flags & G_PARAM_STATIC_NICK)
|
||||||
|
Reference in New Issue
Block a user