summaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-16 16:55:21 +0200
committerDavid Robillard <d@drobilla.net>2018-09-16 17:08:00 +0200
commit75b11aac0bc76e459017728fb0d3f5b631a7a993 (patch)
tree6f2033a083ada31ec666632a22a2a4826681fe64 /src/node.c
parent43373dd610017d7e78672e473a36285a92254f2e (diff)
downloadganv-75b11aac0bc76e459017728fb0d3f5b631a7a993.tar.gz
ganv-75b11aac0bc76e459017728fb0d3f5b631a7a993.tar.bz2
ganv-75b11aac0bc76e459017728fb0d3f5b631a7a993.zip
Remove use of deprecated g_type_class_add_private()
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/node.c b/src/node.c
index 9955c74..4955f36 100644
--- a/src/node.c
+++ b/src/node.c
@@ -24,7 +24,8 @@
guint signal_moved;
-G_DEFINE_TYPE(GanvNode, ganv_node, GANV_TYPE_ITEM)
+G_DEFINE_TYPE_WITH_CODE(GanvNode, ganv_node, GANV_TYPE_ITEM,
+ G_ADD_PRIVATE(GanvNode))
static GanvItemClass* parent_class;
@@ -51,8 +52,7 @@ enum {
static void
ganv_node_init(GanvNode* node)
{
- GanvNodePrivate* impl = G_TYPE_INSTANCE_GET_PRIVATE(
- node, GANV_TYPE_NODE, GanvNodePrivate);
+ GanvNodePrivate* impl = ganv_node_get_instance_private(node);
node->impl = impl;
@@ -545,8 +545,6 @@ ganv_node_class_init(GanvNodeClass* klass)
parent_class = GANV_ITEM_CLASS(g_type_class_peek_parent(klass));
- g_type_class_add_private(klass, sizeof(GanvNodePrivate));
-
gobject_class->set_property = ganv_node_set_property;
gobject_class->get_property = ganv_node_get_property;