Intern type name before registering the type.

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

	* gtype.h (G_DEFINE_TYPE_EXTENDED): Intern type name
	before registering the type.
This commit is contained in:
Matthias Clasen 2005-08-31 14:49:20 +00:00 committed by Matthias Clasen
parent 07c4d80d55
commit 3a151501cc
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2005-08-31 Matthias Clasen <mclasen@redhat.com> 2005-08-31 Matthias Clasen <mclasen@redhat.com>
* gtype.h (G_DEFINE_TYPE_EXTENDED): Intern type name
before registering the type.
* gvaluetypes.c (g_value_types_init): * gvaluetypes.c (g_value_types_init):
* gtypeplugin.c (g_type_plugin_get_type): * gtypeplugin.c (g_type_plugin_get_type):
* gtypemodule.c (g_type_module_get_type): * gtypemodule.c (g_type_module_get_type):

View File

@ -374,7 +374,7 @@ type_name##_get_type (void) \
(GInstanceInitFunc) type_name##_init, \ (GInstanceInitFunc) type_name##_init, \
NULL /* value_table */ \ 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 ; } \ { CODE ; } \
} \ } \
return g_define_type_id; \ return g_define_type_id; \