From 6d137876393a3a8af5e4ad756c4ae849be0399c9 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 5 Sep 2017 20:27:30 -0400 Subject: [PATCH] Rename bt_X_from_private_X() -> bt_X_from_private() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The second object's name is redundant in this context and only makes the function name longer (sometimes much longer). Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- bindings/python/bt2/bt2/component.py | 10 +++++----- bindings/python/bt2/bt2/connection.py | 2 +- bindings/python/bt2/bt2/native_btcomponent.i | 2 +- .../python/bt2/bt2/native_btcomponentclass.i | 2 +- bindings/python/bt2/bt2/native_btconnection.i | 2 +- bindings/python/bt2/bt2/native_btport.i | 2 +- bindings/python/bt2/bt2/port.py | 4 ++-- include/babeltrace/graph/component-internal.h | 2 +- .../babeltrace/graph/connection-internal.h | 2 +- .../graph/notification-iterator-internal.h | 2 +- include/babeltrace/graph/port-internal.h | 2 +- include/babeltrace/graph/private-component.h | 2 +- ...connection-private-notification-iterator.h | 2 +- include/babeltrace/graph/private-connection.h | 2 +- include/babeltrace/graph/private-port.h | 2 +- lib/graph/component.c | 8 ++++---- lib/graph/connection.c | 6 +++--- lib/graph/filter.c | 12 +++++------ lib/graph/iterator.c | 6 +++--- lib/graph/port.c | 12 +++++------ lib/graph/sink.c | 6 +++--- lib/graph/source.c | 6 +++--- plugins/ctf/lttng-live/lttng-live.c | 8 ++++---- plugins/utils/muxer/muxer.c | 12 +++++------ tests/lib/test_graph_topo.c | 20 +++++++++---------- tests/plugins/test-utils-muxer.c | 2 +- 26 files changed, 69 insertions(+), 69 deletions(-) diff --git a/bindings/python/bt2/bt2/component.py b/bindings/python/bt2/bt2/component.py index 3e5efa0d..fc473984 100644 --- a/bindings/python/bt2/bt2/component.py +++ b/bindings/python/bt2/bt2/component.py @@ -107,7 +107,7 @@ class _PortIterator(collections.abc.Iterator): assert(port_ptr) if comp_ports._is_private: - port_pub_ptr = native_bt.port_from_private_port(port_ptr) + port_pub_ptr = native_bt.port_from_private(port_ptr) name = native_bt.port_get_name(port_pub_ptr) native_bt.put(port_pub_ptr) else: @@ -143,7 +143,7 @@ class _ComponentPorts(collections.abc.Mapping): def __len__(self): if self._is_private: - pub_ptr = native_bt.component_from_private_component(self._component._ptr) + pub_ptr = native_bt.component_from_private(self._component._ptr) count = self._get_port_count_fn(pub_ptr) native_bt.put(pub_ptr) else: @@ -515,7 +515,7 @@ class _UserComponentType(type): class _UserComponent(metaclass=_UserComponentType): @property def name(self): - pub_ptr = native_bt.component_from_private_component(self._ptr) + pub_ptr = native_bt.component_from_private(self._ptr) name = native_bt.component_get_name(pub_ptr) native_bt.put(pub_ptr) assert(name is not None) @@ -523,7 +523,7 @@ class _UserComponent(metaclass=_UserComponentType): @property def graph(self): - pub_ptr = native_bt.component_from_private_component(self._ptr) + pub_ptr = native_bt.component_from_private(self._ptr) ptr = native_bt.component_get_graph(pub_ptr) native_bt.put(pub_ptr) assert(ptr) @@ -531,7 +531,7 @@ class _UserComponent(metaclass=_UserComponentType): @property def component_class(self): - pub_ptr = native_bt.component_from_private_component(self._ptr) + pub_ptr = native_bt.component_from_private(self._ptr) cc_ptr = native_bt.component_get_class(pub_ptr) native_bt.put(pub_ptr) assert(cc_ptr) diff --git a/bindings/python/bt2/bt2/connection.py b/bindings/python/bt2/bt2/connection.py index 289667f5..d430bc5b 100644 --- a/bindings/python/bt2/bt2/connection.py +++ b/bindings/python/bt2/bt2/connection.py @@ -39,7 +39,7 @@ def _handle_status(status, gen_error_msg): def _create_private_from_ptr(ptr): obj = _PrivateConnection._create_from_ptr(ptr) - obj._pub_ptr = native_bt.connection_from_private_connection(ptr) + obj._pub_ptr = native_bt.connection_from_private(ptr) assert(obj._pub_ptr) return obj diff --git a/bindings/python/bt2/bt2/native_btcomponent.i b/bindings/python/bt2/bt2/native_btcomponent.i index ea3e0f8a..0e20fb22 100644 --- a/bindings/python/bt2/bt2/native_btcomponent.i +++ b/bindings/python/bt2/bt2/native_btcomponent.i @@ -46,7 +46,7 @@ struct bt_component_class *bt_component_get_class( enum bt_component_class_type bt_component_get_class_type( struct bt_component *component); struct bt_graph *bt_component_get_graph(struct bt_component *component); -struct bt_component *bt_component_from_private_component( +struct bt_component *bt_component_from_private( struct bt_private_component *private_component); /* Source component functions */ diff --git a/bindings/python/bt2/bt2/native_btcomponentclass.i b/bindings/python/bt2/bt2/native_btcomponentclass.i index aa364528..43077230 100644 --- a/bindings/python/bt2/bt2/native_btcomponentclass.i +++ b/bindings/python/bt2/bt2/native_btcomponentclass.i @@ -275,7 +275,7 @@ static enum bt_component_status bt_py3_cc_init( struct bt_value *params, void *init_method_data) { struct bt_component *comp = - bt_component_from_private_component(priv_comp); + bt_component_from_private(priv_comp); struct bt_component_class *comp_cls = bt_component_get_class(comp); enum bt_component_status status = BT_COMPONENT_STATUS_OK; PyObject *py_cls = NULL; diff --git a/bindings/python/bt2/bt2/native_btconnection.i b/bindings/python/bt2/bt2/native_btconnection.i index 2432549f..db54a91c 100644 --- a/bindings/python/bt2/bt2/native_btconnection.i +++ b/bindings/python/bt2/bt2/native_btconnection.i @@ -44,7 +44,7 @@ struct bt_port *bt_connection_get_upstream_port( int bt_connection_is_ended(struct bt_connection *connection); /* Functions (private) */ -struct bt_connection *bt_connection_from_private_connection( +struct bt_connection *bt_connection_from_private( struct bt_private_connection *private_connection); /* Helper functions for Python */ diff --git a/bindings/python/bt2/bt2/native_btport.i b/bindings/python/bt2/bt2/native_btport.i index c2b9867b..b14550dc 100644 --- a/bindings/python/bt2/bt2/native_btport.i +++ b/bindings/python/bt2/bt2/native_btport.i @@ -49,7 +49,7 @@ enum bt_port_status bt_port_disconnect(struct bt_port *port); int bt_port_is_connected(struct bt_port *port); /* Functions (private) */ -struct bt_port *bt_port_from_private_port(struct bt_private_port *private_port); +struct bt_port *bt_port_from_private(struct bt_private_port *private_port); struct bt_private_connection *bt_private_port_get_private_connection( struct bt_private_port *private_port); struct bt_private_component *bt_private_port_get_private_component( diff --git a/bindings/python/bt2/bt2/port.py b/bindings/python/bt2/bt2/port.py index 2cbcda52..f5bc3ef7 100644 --- a/bindings/python/bt2/bt2/port.py +++ b/bindings/python/bt2/bt2/port.py @@ -44,7 +44,7 @@ def _create_from_ptr(ptr): def _create_private_from_ptr(ptr): - pub_ptr = native_bt.port_from_private_port(ptr) + pub_ptr = native_bt.port_from_private(ptr) utils._handle_ptr(pub_ptr, 'cannot get port object from private port object') port_type = native_bt.port_get_type(pub_ptr) assert(port_type == native_bt.PORT_TYPE_INPUT or port_type == native_bt.PORT_TYPE_OUTPUT) @@ -143,7 +143,7 @@ class _PrivatePort(object._PrivateObject, _Port): if comp_ptr is None: return - pub_comp_ptr = native_bt.component_from_private_component(comp_ptr) + pub_comp_ptr = native_bt.component_from_private(comp_ptr) assert(pub_comp_ptr) comp = bt2.component._create_generic_component_from_ptr(pub_comp_ptr) native_bt.put(comp_ptr) diff --git a/include/babeltrace/graph/component-internal.h b/include/babeltrace/graph/component-internal.h index 35a353a1..8d3f73a9 100644 --- a/include/babeltrace/graph/component-internal.h +++ b/include/babeltrace/graph/component-internal.h @@ -69,7 +69,7 @@ struct bt_component { }; static inline -struct bt_component *bt_component_from_private( +struct bt_component *bt_component_borrow_from_private( struct bt_private_component *private_component) { return (void *) private_component; diff --git a/include/babeltrace/graph/connection-internal.h b/include/babeltrace/graph/connection-internal.h index f99d125f..587e4822 100644 --- a/include/babeltrace/graph/connection-internal.h +++ b/include/babeltrace/graph/connection-internal.h @@ -60,7 +60,7 @@ struct bt_connection { }; static inline -struct bt_connection *bt_connection_from_private( +struct bt_connection *bt_connection_borrow_from_private( struct bt_private_connection *private_connection) { return (void *) private_connection; diff --git a/include/babeltrace/graph/notification-iterator-internal.h b/include/babeltrace/graph/notification-iterator-internal.h index fd3dd4f3..bf795a3a 100644 --- a/include/babeltrace/graph/notification-iterator-internal.h +++ b/include/babeltrace/graph/notification-iterator-internal.h @@ -163,7 +163,7 @@ void bt_notification_iterator_replace_current_notification( static inline struct bt_notification_iterator_private_connection * -bt_private_connection_notification_iterator_from_private( +bt_private_connection_notification_iterator_borrow_from_private( struct bt_private_connection_private_notification_iterator *private_notification_iterator) { return (void *) private_notification_iterator; diff --git a/include/babeltrace/graph/port-internal.h b/include/babeltrace/graph/port-internal.h index 43d23dd6..f4d4c036 100644 --- a/include/babeltrace/graph/port-internal.h +++ b/include/babeltrace/graph/port-internal.h @@ -38,7 +38,7 @@ struct bt_port { }; static inline -struct bt_port *bt_port_from_private( +struct bt_port *bt_port_borrow_from_private( struct bt_private_port *private_port) { return (void *) private_port; diff --git a/include/babeltrace/graph/private-component.h b/include/babeltrace/graph/private-component.h index cde10e08..ce0a6b06 100644 --- a/include/babeltrace/graph/private-component.h +++ b/include/babeltrace/graph/private-component.h @@ -30,7 +30,7 @@ extern "C" { struct bt_component; struct bt_private_component; -extern struct bt_component *bt_component_from_private_component( +extern struct bt_component *bt_component_from_private( struct bt_private_component *private_component); extern void *bt_private_component_get_user_data( diff --git a/include/babeltrace/graph/private-connection-private-notification-iterator.h b/include/babeltrace/graph/private-connection-private-notification-iterator.h index 56dc1c10..41248947 100644 --- a/include/babeltrace/graph/private-connection-private-notification-iterator.h +++ b/include/babeltrace/graph/private-connection-private-notification-iterator.h @@ -34,7 +34,7 @@ struct bt_private_connection; struct bt_private_connection_private_notification_iterator; struct bt_notification_iterator * -bt_private_connection_notification_iterator_from_private_notification_iterator( +bt_private_connection_notification_iterator_from_private( struct bt_private_connection_private_notification_iterator *private_notification_iterator); extern struct bt_private_component * diff --git a/include/babeltrace/graph/private-connection.h b/include/babeltrace/graph/private-connection.h index b64559ec..e16ce16e 100644 --- a/include/babeltrace/graph/private-connection.h +++ b/include/babeltrace/graph/private-connection.h @@ -36,7 +36,7 @@ struct bt_private_port; struct bt_private_connection; struct bt_notification_iterator; -extern struct bt_connection *bt_connection_from_private_connection( +extern struct bt_connection *bt_connection_from_private( struct bt_private_connection *private_connection); extern enum bt_connection_status diff --git a/include/babeltrace/graph/private-port.h b/include/babeltrace/graph/private-port.h index e228594c..e109649f 100644 --- a/include/babeltrace/graph/private-port.h +++ b/include/babeltrace/graph/private-port.h @@ -32,7 +32,7 @@ struct bt_private_port; struct bt_private_component; struct bt_private_connection; -struct bt_port *bt_port_from_private_port(struct bt_private_port *private_port); +struct bt_port *bt_port_from_private(struct bt_private_port *private_port); extern struct bt_private_connection *bt_private_port_get_private_connection( struct bt_private_port *private_port); extern struct bt_private_component *bt_private_port_get_private_component( diff --git a/lib/graph/component.c b/lib/graph/component.c index ab5d0ad2..42ba13f4 100644 --- a/lib/graph/component.c +++ b/lib/graph/component.c @@ -143,10 +143,10 @@ void bt_component_destroy(struct bt_object *obj) g_free(component); } -struct bt_component *bt_component_from_private_component( +struct bt_component *bt_component_from_private( struct bt_private_component *private_component) { - return bt_get(bt_component_from_private(private_component)); + return bt_get(bt_component_borrow_from_private(private_component)); } enum bt_component_class_type bt_component_get_class_type( @@ -335,7 +335,7 @@ void *bt_private_component_get_user_data( struct bt_private_component *private_component) { struct bt_component *component = - bt_component_from_private(private_component); + bt_component_borrow_from_private(private_component); return component ? component->user_data : NULL; } @@ -345,7 +345,7 @@ enum bt_component_status bt_private_component_set_user_data( void *data) { struct bt_component *component = - bt_component_from_private(private_component); + bt_component_borrow_from_private(private_component); enum bt_component_status ret = BT_COMPONENT_STATUS_OK; if (!component) { diff --git a/lib/graph/connection.c b/lib/graph/connection.c index 32146b13..6c41f4c9 100644 --- a/lib/graph/connection.c +++ b/lib/graph/connection.c @@ -116,10 +116,10 @@ void bt_connection_parent_is_owner(struct bt_object *obj) bt_connection_try_remove_from_graph(connection); } -struct bt_connection *bt_connection_from_private_connection( +struct bt_connection *bt_connection_from_private( struct bt_private_connection *private_connection) { - return bt_get(bt_connection_from_private(private_connection)); + return bt_get(bt_connection_borrow_from_private(private_connection)); } BT_HIDDEN @@ -301,7 +301,7 @@ bt_private_connection_create_notification_iterator( goto end; } - connection = bt_connection_from_private(private_connection); + connection = bt_connection_borrow_from_private(private_connection); if (bt_graph_is_canceled(bt_connection_borrow_graph(connection))) { BT_LOGW("Cannot create notification iterator from connection: " diff --git a/lib/graph/filter.c b/lib/graph/filter.c index 67beb4cd..8914e1ef 100644 --- a/lib/graph/filter.c +++ b/lib/graph/filter.c @@ -229,7 +229,7 @@ bt_private_component_filter_get_input_private_port_by_index( /* bt_component_filter_get_input_port_by_index() logs details/errors */ return bt_private_port_from_port( bt_component_filter_get_input_port_by_index( - bt_component_from_private(private_component), index)); + bt_component_borrow_from_private(private_component), index)); } struct bt_private_port * @@ -240,7 +240,7 @@ bt_private_component_filter_get_input_private_port_by_name( /* bt_component_filter_get_input_port_by_name() logs details/errors */ return bt_private_port_from_port( bt_component_filter_get_input_port_by_name( - bt_component_from_private(private_component), name)); + bt_component_borrow_from_private(private_component), name)); } enum bt_component_status bt_private_component_filter_add_input_private_port( @@ -251,7 +251,7 @@ enum bt_component_status bt_private_component_filter_add_input_private_port( enum bt_component_status status = BT_COMPONENT_STATUS_OK; struct bt_port *port = NULL; struct bt_component *component = - bt_component_from_private(private_component); + bt_component_borrow_from_private(private_component); struct bt_graph *graph; if (!component) { @@ -305,7 +305,7 @@ bt_private_component_filter_get_output_private_port_by_index( /* bt_component_filter_get_output_port_by_index() logs details/errors */ return bt_private_port_from_port( bt_component_filter_get_output_port_by_index( - bt_component_from_private(private_component), index)); + bt_component_borrow_from_private(private_component), index)); } struct bt_private_port * @@ -316,7 +316,7 @@ bt_private_component_filter_get_output_private_port_by_name( /* bt_component_filter_get_output_port_by_name() logs details/errors */ return bt_private_port_from_port( bt_component_filter_get_output_port_by_name( - bt_component_from_private(private_component), name)); + bt_component_borrow_from_private(private_component), name)); } enum bt_component_status bt_private_component_filter_add_output_private_port( @@ -327,7 +327,7 @@ enum bt_component_status bt_private_component_filter_add_output_private_port( enum bt_component_status status = BT_COMPONENT_STATUS_OK; struct bt_port *port = NULL; struct bt_component *component = - bt_component_from_private(private_component); + bt_component_borrow_from_private(private_component); struct bt_graph *graph; if (!component) { diff --git a/lib/graph/iterator.c b/lib/graph/iterator.c index 1979c69a..a4b6e903 100644 --- a/lib/graph/iterator.c +++ b/lib/graph/iterator.c @@ -699,7 +699,7 @@ void *bt_private_connection_private_notification_iterator_get_user_data( struct bt_private_connection_private_notification_iterator *private_iterator) { struct bt_notification_iterator_private_connection *iterator = - bt_private_connection_notification_iterator_from_private(private_iterator); + bt_private_connection_notification_iterator_borrow_from_private(private_iterator); return iterator ? iterator->user_data : NULL; } @@ -712,7 +712,7 @@ bt_private_connection_private_notification_iterator_set_user_data( enum bt_notification_iterator_status ret = BT_NOTIFICATION_ITERATOR_STATUS_OK; struct bt_notification_iterator_private_connection *iterator = - bt_private_connection_notification_iterator_from_private(private_iterator); + bt_private_connection_notification_iterator_borrow_from_private(private_iterator); if (!iterator) { BT_LOGW_STR("Invalid parameter: notification iterator is NULL."); @@ -2369,7 +2369,7 @@ bt_private_connection_private_notification_iterator_get_private_component( { return bt_private_component_from_component( bt_private_connection_notification_iterator_get_component( - (void *) bt_private_connection_notification_iterator_from_private(private_iterator))); + (void *) bt_private_connection_notification_iterator_borrow_from_private(private_iterator))); } static diff --git a/lib/graph/port.c b/lib/graph/port.c index 60f88a33..43f3134c 100644 --- a/lib/graph/port.c +++ b/lib/graph/port.c @@ -51,10 +51,10 @@ void bt_port_destroy(struct bt_object *obj) g_free(port); } -struct bt_port *bt_port_from_private_port( +struct bt_port *bt_port_from_private( struct bt_private_port *private_port) { - return bt_get(bt_port_from_private(private_port)); + return bt_get(bt_port_borrow_from_private(private_port)); } BT_HIDDEN @@ -144,14 +144,14 @@ struct bt_private_connection *bt_private_port_get_private_connection( struct bt_private_port *private_port) { return bt_private_connection_from_connection(bt_port_get_connection( - bt_port_from_private(private_port))); + bt_port_borrow_from_private(private_port))); } struct bt_private_component *bt_private_port_get_private_component( struct bt_private_port *private_port) { return bt_private_component_from_component(bt_port_get_component( - bt_port_from_private(private_port))); + bt_port_borrow_from_private(private_port))); } BT_HIDDEN @@ -173,7 +173,7 @@ enum bt_port_status bt_private_port_remove_from_component( struct bt_private_port *private_port) { enum bt_port_status status = BT_PORT_STATUS_OK; - struct bt_port *port = bt_port_from_private(private_port); + struct bt_port *port = bt_port_borrow_from_private(private_port); struct bt_component *comp = NULL; enum bt_component_status comp_status; @@ -245,5 +245,5 @@ void *bt_private_port_get_user_data( struct bt_private_port *private_port) { return private_port ? - bt_port_from_private(private_port)->user_data : NULL; + bt_port_borrow_from_private(private_port)->user_data : NULL; } diff --git a/lib/graph/sink.c b/lib/graph/sink.c index 455ed4ef..f0feb3b4 100644 --- a/lib/graph/sink.c +++ b/lib/graph/sink.c @@ -183,7 +183,7 @@ bt_private_component_sink_get_input_private_port_by_index( /* bt_component_sink_get_input_port_by_index() logs details/errors */ return bt_private_port_from_port( bt_component_sink_get_input_port_by_index( - bt_component_from_private(private_component), index)); + bt_component_borrow_from_private(private_component), index)); } struct bt_private_port * @@ -194,7 +194,7 @@ bt_private_component_sink_get_input_private_port_by_name( /* bt_component_sink_get_input_port_by_name() logs details/errors */ return bt_private_port_from_port( bt_component_sink_get_input_port_by_name( - bt_component_from_private(private_component), name)); + bt_component_borrow_from_private(private_component), name)); } enum bt_component_status bt_private_component_sink_add_input_private_port( @@ -205,7 +205,7 @@ enum bt_component_status bt_private_component_sink_add_input_private_port( enum bt_component_status status = BT_COMPONENT_STATUS_OK; struct bt_port *port = NULL; struct bt_component *component = - bt_component_from_private(private_component); + bt_component_borrow_from_private(private_component); struct bt_graph *graph; if (!component) { diff --git a/lib/graph/source.c b/lib/graph/source.c index b1a12a5d..afdb3765 100644 --- a/lib/graph/source.c +++ b/lib/graph/source.c @@ -149,7 +149,7 @@ bt_private_component_source_get_output_private_port_by_name( /* bt_component_source_get_output_port_by_name() logs details/errors */ return bt_private_port_from_port( bt_component_source_get_output_port_by_name( - bt_component_from_private(private_component), name)); + bt_component_borrow_from_private(private_component), name)); } struct bt_private_port * @@ -159,7 +159,7 @@ bt_private_component_source_get_output_private_port_by_index( /* bt_component_source_get_output_port_by_index() logs details/errors */ return bt_private_port_from_port( bt_component_source_get_output_port_by_index( - bt_component_from_private(private_component), index)); + bt_component_borrow_from_private(private_component), index)); } enum bt_component_status bt_private_component_source_add_output_private_port( @@ -170,7 +170,7 @@ enum bt_component_status bt_private_component_source_add_output_private_port( enum bt_component_status status = BT_COMPONENT_STATUS_OK; struct bt_port *port = NULL; struct bt_component *component = - bt_component_from_private(private_component); + bt_component_borrow_from_private(private_component); struct bt_graph *graph; if (!component) { diff --git a/plugins/ctf/lttng-live/lttng-live.c b/plugins/ctf/lttng-live/lttng-live.c index b40934b7..08ece949 100644 --- a/plugins/ctf/lttng-live/lttng-live.c +++ b/plugins/ctf/lttng-live/lttng-live.c @@ -70,7 +70,7 @@ void print_stream_state(struct lttng_live_stream_iterator *stream) { struct bt_port *port; - port = bt_port_from_private_port(stream->port); + port = bt_port_from_private(stream->port); print_dbg("stream %s state %s last_inact_ts %" PRId64 " cur_inact_ts %" PRId64, bt_port_get_name(port), print_state(stream), @@ -90,7 +90,7 @@ bt_bool lttng_live_is_canceled(struct lttng_live_component *lttng_live) return BT_FALSE; } - component = bt_component_from_private_component(lttng_live->private_component); + component = bt_component_from_private(lttng_live->private_component); graph = bt_component_get_graph(component); ret = bt_graph_is_canceled(graph); bt_put(graph); @@ -149,7 +149,7 @@ int lttng_live_remove_port(struct lttng_live_component *lttng_live, int64_t nr_ports; int ret; - component = bt_component_from_private_component(lttng_live->private_component); + component = bt_component_from_private(lttng_live->private_component); nr_ports = bt_component_source_get_output_port_count(component); if (nr_ports < 0) { return -1; @@ -1165,7 +1165,7 @@ enum bt_component_status lttng_live_accept_port_connection( bt_private_component_get_user_data(private_component); struct bt_component *other_component; enum bt_component_status status = BT_COMPONENT_STATUS_OK; - struct bt_port *self_port = bt_port_from_private_port(self_private_port); + struct bt_port *self_port = bt_port_from_private(self_private_port); other_component = bt_port_get_component(other_port); bt_put(other_component); /* weak */ diff --git a/plugins/utils/muxer/muxer.c b/plugins/utils/muxer/muxer.c index 8722e27f..efecf6c9 100644 --- a/plugins/utils/muxer/muxer.c +++ b/plugins/utils/muxer/muxer.c @@ -406,7 +406,7 @@ static struct bt_notification_iterator *create_notif_iter_on_input_port( struct bt_private_port *priv_port, int *ret) { - struct bt_port *port = bt_port_from_private_port(priv_port); + struct bt_port *port = bt_port_from_private(priv_port); struct bt_notification_iterator *notif_iter = NULL; struct bt_private_connection *priv_conn = NULL; enum bt_connection_status conn_status; @@ -530,7 +530,7 @@ int muxer_notif_iter_handle_newly_connected_ports( } priv_port = node->data; - port = bt_port_from_private_port(priv_port); + port = bt_port_from_private(priv_port); assert(port); if (!bt_port_is_connected(port)) { @@ -1164,7 +1164,7 @@ int muxer_notif_iter_init_newly_connected_ports(struct muxer_comp *muxer_comp, * iterator's list of newly connected ports. They will be * handled by muxer_notif_iter_handle_newly_connected_ports(). */ - comp = bt_component_from_private_component(muxer_comp->priv_comp); + comp = bt_component_from_private(muxer_comp->priv_comp); assert(comp); count = bt_component_filter_get_input_port_count(comp); if (count < 0) { @@ -1181,7 +1181,7 @@ int muxer_notif_iter_init_newly_connected_ports(struct muxer_comp *muxer_comp, struct bt_port *port; assert(priv_port); - port = bt_port_from_private_port(priv_port); + port = bt_port_from_private(priv_port); assert(port); if (!bt_port_is_connected(port)) { @@ -1402,7 +1402,7 @@ void muxer_port_connected( struct bt_port *other_port) { struct bt_port *self_port = - bt_port_from_private_port(self_private_port); + bt_port_from_private(self_private_port); struct muxer_comp *muxer_comp = bt_private_component_get_user_data(priv_comp); size_t i; @@ -1474,7 +1474,7 @@ BT_HIDDEN void muxer_port_disconnected(struct bt_private_component *priv_comp, struct bt_private_port *priv_port) { - struct bt_port *port = bt_port_from_private_port(priv_port); + struct bt_port *port = bt_port_from_private(priv_port); struct muxer_comp *muxer_comp = bt_private_component_get_user_data(priv_comp); diff --git a/tests/lib/test_graph_topo.c b/tests/lib/test_graph_topo.c index 580648b2..e83d6b09 100644 --- a/tests/lib/test_graph_topo.c +++ b/tests/lib/test_graph_topo.c @@ -304,8 +304,8 @@ enum bt_component_status accept_port_connection( struct event event = { .type = COMP_ACCEPT_PORT_CONNECTION, .data.comp_accept_port_connection = { - .comp = bt_component_from_private_component(private_component), - .self_port = bt_port_from_private_port(self_private_port), + .comp = bt_component_from_private(private_component), + .self_port = bt_port_from_private(self_private_port), .other_port = other_port, }, }; @@ -326,8 +326,8 @@ void src_port_connected(struct bt_private_component *private_component, struct event event = { .type = COMP_PORT_CONNECTED, .data.comp_port_connected = { - .comp = bt_component_from_private_component(private_component), - .self_port = bt_port_from_private_port(self_private_port), + .comp = bt_component_from_private(private_component), + .self_port = bt_port_from_private(self_private_port), .other_port = other_port, }, }; @@ -355,8 +355,8 @@ void src_port_disconnected(struct bt_private_component *private_component, struct event event = { .type = COMP_PORT_DISCONNECTED, .data.comp_port_disconnected = { - .comp = bt_component_from_private_component(private_component), - .port = bt_port_from_private_port(private_port), + .comp = bt_component_from_private(private_component), + .port = bt_port_from_private(private_port), }, }; @@ -417,8 +417,8 @@ void sink_port_connected(struct bt_private_component *private_component, struct event event = { .type = COMP_PORT_CONNECTED, .data.comp_port_connected = { - .comp = bt_component_from_private_component(private_component), - .self_port = bt_port_from_private_port(self_private_port), + .comp = bt_component_from_private(private_component), + .self_port = bt_port_from_private(self_private_port), .other_port = other_port, }, }; @@ -435,8 +435,8 @@ void sink_port_disconnected(struct bt_private_component *private_component, struct event event = { .type = COMP_PORT_DISCONNECTED, .data.comp_port_disconnected = { - .comp = bt_component_from_private_component(private_component), - .port = bt_port_from_private_port(private_port), + .comp = bt_component_from_private(private_component), + .port = bt_port_from_private(private_port), }, }; diff --git a/tests/plugins/test-utils-muxer.c b/tests/plugins/test-utils-muxer.c index 6a94a547..0430b7f7 100644 --- a/tests/plugins/test-utils-muxer.c +++ b/tests/plugins/test-utils-muxer.c @@ -404,7 +404,7 @@ enum bt_notification_iterator_status src_iter_init( { struct src_iter_user_data *user_data = g_new0(struct src_iter_user_data, 1); - struct bt_port *port = bt_port_from_private_port(private_port); + struct bt_port *port = bt_port_from_private(private_port); const char *port_name; int ret; -- 2.34.1