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

@@ -35,7 +35,7 @@ g_type_plugin_get_type (void)
NULL, /* base_finalize */
};
type_plugin_type = g_type_register_static (G_TYPE_INTERFACE, "GTypePlugin", &type_plugin_info, 0);
type_plugin_type = g_type_register_static (G_TYPE_INTERFACE, g_intern_static_string ("GTypePlugin"), &type_plugin_info, 0);
}
return type_plugin_type;