if (!test_iface_type)
{
- static const GTypeInfo test_iface_info =
+ const GTypeInfo test_iface_info =
{
sizeof (TestIfaceClass),
(GBaseInitFunc) iface_base_init, /* base_init */
if (!test_object_type)
{
- static const GTypeInfo test_object_info =
+ const GTypeInfo test_object_info =
{
sizeof (TestObjectClass),
NULL, /* base_init */
const GValue *handler_return,
gpointer data)
{
- gchar *accu_string = g_value_get_string (return_accu);
- gchar *new_string = g_value_get_string (handler_return);
+ const gchar *accu_string = g_value_get_string (return_accu);
+ const gchar *new_string = g_value_get_string (handler_return);
gchar *result_string;
if (accu_string)
};
static void derived_object_class_init (DerivedObjectClass *class);
static void derived_object_init (DerivedObject *dobject);
-GType
+static GType
derived_object_get_type (void)
{
static GType derived_object_type = 0;
if (!derived_object_type)
{
- static const GTypeInfo derived_object_info =
+ const GTypeInfo derived_object_info =
{
sizeof (DerivedObjectClass),
NULL, /* base_init */
/* test new fundamentals */
g_assert (G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST) == g_type_fundamental_next ());
type = g_type_register_fundamental (g_type_fundamental_next (), "FooShadow1", &info, &finfo, 0);
+ g_assert (type == G_TYPE_RESERVED_USER_FIRST);
g_assert (G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST + 1) == g_type_fundamental_next ());
type = g_type_register_fundamental (g_type_fundamental_next (), "FooShadow2", &info, &finfo, 0);
+ g_assert (type == G_TYPE_RESERVED_USER_FIRST + 1);
g_assert (G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST + 2) == g_type_fundamental_next ());
g_assert (g_type_from_name ("FooShadow1") == G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST));
g_assert (g_type_from_name ("FooShadow2") == G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST + 1));