Avoid copying the set_name by interning it.

2005-12-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbindings.c (gtk_binding_set_new): Avoid copying
	the set_name by interning it.
This commit is contained in:
Matthias Clasen 2005-12-27 06:10:20 +00:00 • committed by Matthias Clasen
commit 779c7ea8df
3 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2005-12-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbindings.c (gtk_binding_set_new): Avoid copying
the set_name by interning it.
2005-12-26 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Precache atoms

View file

@ -1,3 +1,8 @@
2005-12-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbindings.c (gtk_binding_set_new): Avoid copying
the set_name by interning it.
2005-12-26 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Precache atoms

View file

@ -558,7 +558,7 @@ gtk_binding_set_new (const gchar *set_name)
g_return_val_if_fail (set_name != NULL, NULL);
binding_set = g_new (GtkBindingSet, 1);
binding_set->set_name = g_strdup (set_name);
binding_set->set_name = g_intern_string (set_name);
binding_set->widget_path_pspecs = NULL;
binding_set->widget_class_pspecs = NULL;
binding_set->class_branch_pspecs = NULL;
@ -1442,7 +1442,6 @@ binding_set_delete (GtkBindingSet *binding_set)
free_pattern_specs (binding_set->widget_class_pspecs);
free_pattern_specs (binding_set->class_branch_pspecs);
g_free (binding_set->set_name);
g_free (binding_set);
}