Fix: lib: bt_component_class_sink_simple_borrow() is internal
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 16 Apr 2020 13:58:08 +0000 (09:58 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 23 Apr 2020 03:45:20 +0000 (23:45 -0400)
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 <eeppeliteloop@gmail.com>
Change-Id: I77e10d43a2d90ea4b99c7c7fc09606cbf2ffbe41
Reviewed-on: https://review.lttng.org/c/babeltrace/+/3431
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/lib/graph/component-class-sink-simple.c
src/lib/graph/component-class-sink-simple.h

index 69b40c1dee5e28477e6e5b554ecabaf7b3e28038..9244adb7595f944d62b5235d47d23b88f44f3efc 100644 (file)
@@ -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;
        }
index 6608f99637e60a47031c3296b061db2b15fd0e4f..5454bd3980a1f51971113cbca97a750327312614 100644 (file)
@@ -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 */
This page took 0.024523 seconds and 4 git commands to generate.