* THE SOFTWARE.
*/
-static
-void graph_listener_removed(void *py_callable)
-{
- BT_ASSERT(py_callable);
- Py_DECREF(py_callable);
-}
-
static bt_graph_listener_func_status port_added_listener(
const void *component,
swig_type_info *component_swig_type,
/* source output port */
status = bt_graph_add_source_component_output_port_added_listener(
graph, source_component_output_port_added_listener,
- graph_listener_removed, py_callable, &listener_id);
+ py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
/*
* bt_graph_add_source_component_output_port_added_listener has
/* filter input port */
status = bt_graph_add_filter_component_input_port_added_listener(
graph, filter_component_input_port_added_listener,
- graph_listener_removed, py_callable, &listener_id);
+ py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
/*
* bt_graph_add_filter_component_input_port_added_listener has
/* filter output port */
status = bt_graph_add_filter_component_output_port_added_listener(
graph, filter_component_output_port_added_listener,
- graph_listener_removed, py_callable, &listener_id);
+ py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
/*
* bt_graph_add_filter_component_output_port_added_listener has
/* sink input port */
status = bt_graph_add_sink_component_input_port_added_listener(
graph, sink_component_input_port_added_listener,
- graph_listener_removed, py_callable, &listener_id);
+ py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
/*
* bt_graph_add_sink_component_input_port_added_listener has
PyTuple_SET_ITEM(py_listener_ids, 3, py_listener_id);
py_listener_id = NULL;
-
- Py_INCREF(py_callable);
- Py_INCREF(py_callable);
- Py_INCREF(py_callable);
- Py_INCREF(py_callable);
-
goto end;
error: