diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2013-07-05 00:09:31 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2013-07-09 09:30:02 +0100 |
commit | a71def87c565f2437fdfbde639fdef6cb68404b8 (patch) | |
tree | 5be43e18acd3f4c5d327ec6093c59343a1564118 | |
parent | 76df3ba7d018b5d5d60c4409735b1e446d324f2e (diff) | |
download | gtk+-a71def87c565f2437fdfbde639fdef6cb68404b8.tar.gz |
tests: Use the new macros for adding instance private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
-rw-r--r-- | testsuite/gtk/gtktreemodelrefcount.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/testsuite/gtk/gtktreemodelrefcount.c b/testsuite/gtk/gtktreemodelrefcount.c index 7f29f994e1..69f403656b 100644 --- a/testsuite/gtk/gtktreemodelrefcount.c +++ b/testsuite/gtk/gtktreemodelrefcount.c @@ -55,6 +55,7 @@ static void gtk_tree_model_ref_count_unref_node (GtkTreeModel *mo G_DEFINE_TYPE_WITH_CODE (GtkTreeModelRefCount, gtk_tree_model_ref_count, GTK_TYPE_TREE_STORE, + G_ADD_PRIVATE (GtkTreeModelRefCount) G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL, gtk_tree_model_ref_count_tree_model_init)) @@ -83,9 +84,7 @@ row_removed (GtkTreeModelRefCount *ref_model, static void gtk_tree_model_ref_count_init (GtkTreeModelRefCount *ref_model) { - ref_model->priv = G_TYPE_INSTANCE_GET_PRIVATE (ref_model, - GTK_TYPE_TREE_MODEL_REF_COUNT, - GtkTreeModelRefCountPrivate); + ref_model->priv = gtk_tree_model_ref_count_get_instance_private (ref_model); ref_model->priv->node_hash = g_hash_table_new_full (g_direct_hash, g_direct_equal, @@ -98,13 +97,7 @@ gtk_tree_model_ref_count_init (GtkTreeModelRefCount *ref_model) static void gtk_tree_model_ref_count_class_init (GtkTreeModelRefCountClass *ref_model_class) { - GObjectClass *object_class; - - object_class = (GObjectClass *) ref_model_class; - - object_class->finalize = gtk_tree_model_ref_count_finalize; - - g_type_class_add_private (object_class, sizeof (GtkTreeModelRefCountPrivate)); + G_OBJECT_CLASS (ref_model_class)->finalize = gtk_tree_model_ref_count_finalize; } static void |