lib: make plugin API const-correct
[babeltrace.git] / lib / graph / component-class-sink-colander.c
index a40f8ea09e813122840db65c8e094aef3fa72bf5..0c91aeaa5af4232471ffa4df7e917771f9ef7c45 100644 (file)
@@ -46,7 +46,7 @@ struct colander_data {
 static
 enum bt_self_component_status colander_init(
                struct bt_self_component_sink *self_comp,
-               struct bt_value *params, void *init_method_data)
+               const struct bt_value *params, void *init_method_data)
 {
        enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
        struct colander_data *colander_data = NULL;
@@ -76,7 +76,7 @@ enum bt_self_component_status colander_init(
        }
 
        bt_self_component_set_data(
-               bt_self_component_sink_borrow_self_component(self_comp),
+               bt_self_component_sink_as_self_component(self_comp),
                colander_data);
 
 end:
@@ -88,7 +88,7 @@ void colander_finalize(struct bt_self_component_sink *self_comp)
 {
        struct colander_data *colander_data =
                bt_self_component_get_data(
-                       bt_self_component_sink_borrow_self_component(self_comp));
+                       bt_self_component_sink_as_self_component(self_comp));
 
        if (!colander_data) {
                return;
@@ -107,7 +107,7 @@ enum bt_self_component_status colander_input_port_connected(
        enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
        struct colander_data *colander_data =
                bt_self_component_get_data(
-                       bt_self_component_sink_borrow_self_component(self_comp));
+                       bt_self_component_sink_as_self_component(self_comp));
 
        BT_ASSERT(colander_data);
        BT_OBJECT_PUT_REF_AND_RESET(colander_data->notif_iter);
@@ -134,7 +134,7 @@ enum bt_self_component_status colander_consume(
        enum bt_notification_iterator_status notif_iter_status;
        struct colander_data *colander_data =
                bt_self_component_get_data(
-                       bt_self_component_sink_borrow_self_component(self_comp));
+                       bt_self_component_sink_as_self_component(self_comp));
        bt_notification_array notifs;
 
        BT_ASSERT(colander_data);
@@ -195,9 +195,8 @@ struct bt_component_class_sink *bt_component_class_sink_colander_get(void)
                colander_comp_cls, colander_input_port_connected);
 
 end:
-       return bt_object_get_ref(
-               bt_private_component_class_sink_borrow_component_class_sink(
-                       colander_comp_cls));
+       bt_object_get_ref(colander_comp_cls);
+       return (void *) colander_comp_cls;
 }
 
 __attribute__((destructor)) static
This page took 0.025006 seconds and 4 git commands to generate.