diff options
author | Nicola Fontana <ntd@entidi.it> | 2009-11-06 01:21:09 +0100 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2009-11-06 01:21:09 +0100 |
commit | 1e1131c959c5e74ce1272b698f597e97e0f5ddd7 (patch) | |
tree | 8c414b20aa333a218b41138a17a9361efdcb654e /tests | |
parent | e41f4e85cf56f3419fc284f9ef6cfd61b9008b4e (diff) | |
download | gtk+-1e1131c959c5e74ce1272b698f597e97e0f5ddd7.tar.gz |
Do not use static GTypeInfo and GInterfaceInfo
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.
https://bugzilla.gnome.org/show_bug.cgi?id=600158
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testtreecolumns.c | 8 | ||||
-rw-r--r-- | tests/testtreeview.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/testtreecolumns.c b/tests/testtreecolumns.c index 213836ef61..b8358f5134 100644 --- a/tests/testtreecolumns.c +++ b/tests/testtreecolumns.c @@ -374,7 +374,7 @@ view_column_model_get_type (void) if (!view_column_model_type) { - static const GTypeInfo view_column_model_info = + const GTypeInfo view_column_model_info = { sizeof (GtkListStoreClass), NULL, /* base_init */ @@ -387,21 +387,21 @@ view_column_model_get_type (void) (GInstanceInitFunc) view_column_model_init, }; - static const GInterfaceInfo tree_model_info = + const GInterfaceInfo tree_model_info = { (GInterfaceInitFunc) view_column_model_tree_model_init, NULL, NULL }; - static const GInterfaceInfo drag_source_info = + const GInterfaceInfo drag_source_info = { (GInterfaceInitFunc) view_column_model_drag_source_init, NULL, NULL }; - static const GInterfaceInfo drag_dest_info = + const GInterfaceInfo drag_dest_info = { (GInterfaceInitFunc) view_column_model_drag_dest_init, NULL, diff --git a/tests/testtreeview.c b/tests/testtreeview.c index 8ee688a937..f4552d80a9 100644 --- a/tests/testtreeview.c +++ b/tests/testtreeview.c @@ -891,7 +891,7 @@ gtk_tree_model_types_get_type (void) if (!model_types_type) { - static const GTypeInfo model_types_info = + const GTypeInfo model_types_info = { sizeof (GtkTreeModelTypesClass), NULL, /* base_init */ @@ -904,7 +904,7 @@ gtk_tree_model_types_get_type (void) (GInstanceInitFunc) gtk_tree_model_types_init }; - static const GInterfaceInfo tree_model_info = + const GInterfaceInfo tree_model_info = { (GInterfaceInitFunc) gtk_tree_model_types_tree_model_init, NULL, |