mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
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:
committed by
Matthias Clasen
parent
70af0de0ef
commit
07c4d80d55
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user