From e3bf14f71f976d08e5efb5d832b82c567eac9c14 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Jul 2020 11:56:49 +0200 Subject: Add missing casts for C++ compatibility --- src/box.c | 2 +- src/circle.c | 2 +- src/edge.c | 3 ++- src/group.c | 3 ++- src/item.c | 3 ++- src/module.c | 3 ++- src/node.c | 3 ++- src/port.c | 2 +- src/text.c | 3 ++- src/widget.c | 3 ++- 10 files changed, 17 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/box.c b/src/box.c index 3ecb99d..4ee8e29 100644 --- a/src/box.c +++ b/src/box.c @@ -49,7 +49,7 @@ enum { static void ganv_box_init(GanvBox* box) { - box->impl = ganv_box_get_instance_private(box); + box->impl = (GanvBoxPrivate*)ganv_box_get_instance_private(box); memset(&box->impl->coords, '\0', sizeof(GanvBoxCoords)); diff --git a/src/circle.c b/src/circle.c index 4784c06..5cd9cb9 100644 --- a/src/circle.c +++ b/src/circle.c @@ -39,7 +39,7 @@ enum { static void ganv_circle_init(GanvCircle* circle) { - circle->impl = ganv_circle_get_instance_private(circle); + circle->impl = (GanvCirclePrivate*)ganv_circle_get_instance_private(circle); memset(&circle->impl->coords, '\0', sizeof(GanvCircleCoords)); circle->impl->coords.radius = 0.0; diff --git a/src/edge.c b/src/edge.c index 6ce6f6f..85197d6 100644 --- a/src/edge.c +++ b/src/edge.c @@ -63,7 +63,8 @@ static GanvItemClass* parent_class; static void ganv_edge_init(GanvEdge* edge) { - GanvEdgePrivate* impl = ganv_edge_get_instance_private(edge); + GanvEdgePrivate* impl = + (GanvEdgePrivate*)ganv_edge_get_instance_private(edge); edge->impl = impl; diff --git a/src/group.c b/src/group.c index 503e57b..11b8d08 100644 --- a/src/group.c +++ b/src/group.c @@ -38,7 +38,8 @@ static GanvItemClass* group_parent_class; static void ganv_group_init(GanvGroup* group) { - GanvGroupPrivate* impl = ganv_group_get_instance_private(group); + GanvGroupPrivate* impl = + (GanvGroupPrivate*)ganv_group_get_instance_private(group); group->impl = impl; group->impl->item_list = NULL; diff --git a/src/item.c b/src/item.c index a458acd..95a9ca6 100644 --- a/src/item.c +++ b/src/item.c @@ -73,7 +73,8 @@ static GtkObjectClass* item_parent_class; static void ganv_item_init(GanvItem* item) { - GanvItemPrivate* impl = ganv_item_get_instance_private(item); + GanvItemPrivate* impl = + (GanvItemPrivate*)ganv_item_get_instance_private(item); item->object.flags |= GANV_ITEM_VISIBLE; item->impl = impl; diff --git a/src/module.c b/src/module.c index bad930b..be6cfb8 100644 --- a/src/module.c +++ b/src/module.c @@ -50,7 +50,8 @@ enum { static void ganv_module_init(GanvModule* module) { - GanvModulePrivate* impl = ganv_module_get_instance_private(module); + GanvModulePrivate* impl = + (GanvModulePrivate*)ganv_module_get_instance_private(module); module->impl = impl; diff --git a/src/node.c b/src/node.c index 6857dd2..28acb80 100644 --- a/src/node.c +++ b/src/node.c @@ -52,7 +52,8 @@ enum { static void ganv_node_init(GanvNode* node) { - GanvNodePrivate* impl = ganv_node_get_instance_private(node); + GanvNodePrivate* impl = + (GanvNodePrivate*)ganv_node_get_instance_private(node); node->impl = impl; diff --git a/src/port.c b/src/port.c index eca3e83..2acdf78 100644 --- a/src/port.c +++ b/src/port.c @@ -52,7 +52,7 @@ static guint port_signals[PORT_LAST_SIGNAL]; static void ganv_port_init(GanvPort* port) { - port->impl = ganv_port_get_instance_private(port); + port->impl = (GanvPortPrivate*)ganv_port_get_instance_private(port); port->impl->control = NULL; port->impl->value_label = NULL; diff --git a/src/text.c b/src/text.c index d7ab3e0..c509a28 100644 --- a/src/text.c +++ b/src/text.c @@ -47,7 +47,8 @@ enum { static void ganv_text_init(GanvText* text) { - GanvTextPrivate* impl = ganv_text_get_instance_private(text); + GanvTextPrivate* impl = + (GanvTextPrivate*)ganv_text_get_instance_private(text); text->impl = impl; diff --git a/src/widget.c b/src/widget.c index b08715b..59b360a 100644 --- a/src/widget.c +++ b/src/widget.c @@ -46,7 +46,8 @@ enum { static void ganv_widget_init(GanvWidget* witem) { - GanvWidgetPrivate* impl = ganv_widget_get_instance_private(witem); + GanvWidgetPrivate* impl = + (GanvWidgetPrivate*)ganv_widget_get_instance_private(witem); witem->impl = impl; witem->impl->x = 0.0; -- cgit v1.2.1