From: Philippe Proulx Date: Thu, 16 Apr 2020 13:58:08 +0000 (-0400) Subject: Fix: lib: bt_component_class_sink_simple_borrow() is internal X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=d4a975d8796bb1a6795eab581f628c4896cc9651 Fix: lib: bt_component_class_sink_simple_borrow() is internal My guess is that at some point the intention was to have the user borrow the simple sink component class and call bt_graph_add_sink_component() herself but that's not how it works now: bt_graph_add_simple_sink_component() calls bt_component_class_sink_simple_borrow() internally. Signed-off-by: Philippe Proulx Change-Id: I77e10d43a2d90ea4b99c7c7fc09606cbf2ffbe41 Reviewed-on: https://review.lttng.org/c/babeltrace/+/3431 Reviewed-by: Simon Marchi --- diff --git a/src/lib/graph/component-class-sink-simple.c b/src/lib/graph/component-class-sink-simple.c index 69b40c1d..9244adb7 100644 --- a/src/lib/graph/component-class-sink-simple.c +++ b/src/lib/graph/component-class-sink-simple.c @@ -171,12 +171,11 @@ enum bt_component_class_sink_consume_method_status simple_sink_consume( return status; } +BT_HIDDEN struct bt_component_class_sink *bt_component_class_sink_simple_borrow(void) { enum bt_component_class_set_method_status set_method_status; - BT_ASSERT_PRE_NO_ERROR(); - if (simple_comp_cls) { goto end; } diff --git a/src/lib/graph/component-class-sink-simple.h b/src/lib/graph/component-class-sink-simple.h index 6608f996..5454bd39 100644 --- a/src/lib/graph/component-class-sink-simple.h +++ b/src/lib/graph/component-class-sink-simple.h @@ -18,7 +18,7 @@ struct simple_sink_init_method_data { void *user_data; }; -extern struct bt_component_class_sink * -bt_component_class_sink_simple_borrow(void); +BT_HIDDEN +struct bt_component_class_sink *bt_component_class_sink_simple_borrow(void); #endif /* BABELTRACE_GRAPH_COMPONENT_CLASS_SINK_SIMPLE_H */