X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fgraph.py;h=93636c93a5010b422cc6668499c24b24f2e8746d;hb=5813b3a3ffb8ff44d54b134e26d604af0b5e36db;hp=14c3b65b84f56fc2351455230e3e4edc2eddd08d;hpb=c7e5224bd55c9b9864f7e3a4e8d1a3df276ebc2b;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/graph.py b/src/bindings/python/bt2/bt2/graph.py index 14c3b65b..93636c93 100644 --- a/src/bindings/python/bt2/bt2/graph.py +++ b/src/bindings/python/bt2/bt2/graph.py @@ -36,7 +36,7 @@ def _graph_port_added_listener_from_native( component = bt2_component._create_component_from_ptr_and_get_ref( component_ptr, component_type ) - port = bt2_port._create_from_ptr_and_get_ref(port_ptr, port_type) + port = bt2_port._create_from_const_ptr_and_get_ref(port_ptr, port_type) user_listener(component, port) @@ -52,13 +52,13 @@ def _graph_ports_connected_listener_from_native( upstream_component = bt2_component._create_component_from_ptr_and_get_ref( upstream_component_ptr, upstream_component_type ) - upstream_port = bt2_port._create_from_ptr_and_get_ref( + upstream_port = bt2_port._create_from_const_ptr_and_get_ref( upstream_port_ptr, native_bt.PORT_TYPE_OUTPUT ) downstream_component = bt2_component._create_component_from_ptr_and_get_ref( downstream_component_ptr, downstream_component_type ) - downstream_port = bt2_port._create_from_ptr_and_get_ref( + downstream_port = bt2_port._create_from_const_ptr_and_get_ref( downstream_port_ptr, native_bt.PORT_TYPE_INPUT ) user_listener( @@ -140,8 +140,8 @@ class Graph(object._SharedObject): return bt2_component._create_component_from_ptr(comp_ptr, cc_type) def connect_ports(self, upstream_port, downstream_port): - utils._check_type(upstream_port, bt2_port._OutputPort) - utils._check_type(downstream_port, bt2_port._InputPort) + utils._check_type(upstream_port, bt2_port._OutputPortConst) + utils._check_type(downstream_port, bt2_port._InputPortConst) status, conn_ptr = native_bt.graph_connect_ports( self._ptr, upstream_port._ptr, downstream_port._ptr )