Intern type names before registering the type to avoid unnecessary copies.

2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gvaluetypes.c (g_value_types_init):
	* gtypeplugin.c (g_type_plugin_get_type):
	* gtypemodule.c (g_type_module_get_type):
	* gparam.c (g_param_type_init):
	* gobject.c (g_object_type_init):
	* genums.c (g_enum_types_init):
	* gboxed.c (g_boxed_type_init): Intern type names
	before registering the type to avoid unnecessary
	copies.
This commit is contained in:
Matthias Clasen
2005-08-31 14:38:18 +00:00
committed by Matthias Clasen
parent 70af0de0ef
commit 07c4d80d55
8 changed files with 32 additions and 20 deletions

View File

@@ -139,7 +139,7 @@ g_boxed_type_init (void)
/* G_TYPE_BOXED
*/
type = g_type_register_fundamental (G_TYPE_BOXED, "GBoxed", &info, &finfo,
type = g_type_register_fundamental (G_TYPE_BOXED, g_intern_static_string ("GBoxed"), &info, &finfo,
G_TYPE_FLAG_ABSTRACT | G_TYPE_FLAG_VALUE_ABSTRACT);
g_assert (type == G_TYPE_BOXED);
}