From 3a151501cc2fd1ef5b984c08af20370308cdfe5e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 31 Aug 2005 14:49:20 +0000 Subject: [PATCH] Intern type name before registering the type. 2005-08-31 Matthias Clasen * gtype.h (G_DEFINE_TYPE_EXTENDED): Intern type name before registering the type. --- gobject/ChangeLog | 3 +++ gobject/gtype.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gobject/ChangeLog b/gobject/ChangeLog index bbad94683..ea6979022 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,5 +1,8 @@ 2005-08-31 Matthias Clasen + * gtype.h (G_DEFINE_TYPE_EXTENDED): Intern type name + before registering the type. + * gvaluetypes.c (g_value_types_init): * gtypeplugin.c (g_type_plugin_get_type): * gtypemodule.c (g_type_module_get_type): diff --git a/gobject/gtype.h b/gobject/gtype.h index 43926c7f5..4ab0367f3 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -374,7 +374,7 @@ type_name##_get_type (void) \ (GInstanceInitFunc) type_name##_init, \ NULL /* value_table */ \ }; \ - g_define_type_id = g_type_register_static (TYPE_PARENT, #TypeName, &g_define_type_info, (GTypeFlags) flags); \ + g_define_type_id = g_type_register_static (TYPE_PARENT, g_intern_static_string (#TypeName), &g_define_type_info, (GTypeFlags) flags); \ { CODE ; } \ } \ return g_define_type_id; \