tests: reorganize CLI's `convert` tests
[babeltrace.git] / src / bindings / python / bt2 / bt2 / native_bt_graph.i
index c592452dde11bbfb63d4ca26a93114fe59ad7794..a4e72a2f77228b01d424a38c89fa503cd71b1c63 100644 (file)
@@ -145,7 +145,8 @@ static bt_graph_listener_func_status port_added_listener(
        py_res = PyObject_CallFunction(py_callable, "(OiOi)",
                py_component_ptr, component_class_type, py_port_ptr, port_type);
        if (!py_res) {
-               loge_exception("Graph's port added listener (Python)");
+               loge_exception("Graph's port added listener (Python)",
+                       BT_LOG_OUTPUT_LEVEL);
                PyErr_Clear();
                status = __BT_FUNC_STATUS_ERROR;
                goto end;
@@ -207,7 +208,7 @@ PyObject *bt_bt2_graph_add_port_added_listener(struct bt_graph *graph,
 {
        PyObject *py_listener_ids = NULL;
        PyObject *py_listener_id = NULL;
-       int listener_id;
+       bt_listener_id listener_id;
        bt_graph_add_listener_status status;
        const char * const module_name =
                "graph_add_port_added_listener() (Python)";
@@ -238,7 +239,7 @@ PyObject *bt_bt2_graph_add_port_added_listener(struct bt_graph *graph,
                goto error;
        }
 
-       py_listener_id = PyLong_FromLong(listener_id);
+       py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
        if (!py_listener_id) {
                BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                        "Failed to allocate one PyLong.");
@@ -260,7 +261,7 @@ PyObject *bt_bt2_graph_add_port_added_listener(struct bt_graph *graph,
                goto error;
        }
 
-       py_listener_id = PyLong_FromLong(listener_id);
+       py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
        if (!py_listener_id) {
                BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                        "Failed to allocate one PyLong.");
@@ -282,7 +283,7 @@ PyObject *bt_bt2_graph_add_port_added_listener(struct bt_graph *graph,
                goto error;
        }
 
-       py_listener_id = PyLong_FromLong(listener_id);
+       py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
        if (!py_listener_id) {
                BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                        "Failed to allocate one PyLong.");
@@ -304,7 +305,7 @@ PyObject *bt_bt2_graph_add_port_added_listener(struct bt_graph *graph,
                goto error;
        }
 
-       py_listener_id = PyLong_FromLong(listener_id);
+       py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
        if (!py_listener_id) {
                BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                        "Failed to allocate one PyLong.");
@@ -390,7 +391,8 @@ bt_graph_listener_func_status ports_connected_listener(
                py_downstream_component_ptr, downstream_component_class_type,
                py_downstream_port_ptr);
        if (!py_res) {
-               loge_exception("Graph's port connected listener (Python)");
+               loge_exception("Graph's port connected listener (Python)",
+                       BT_LOG_OUTPUT_LEVEL);
                PyErr_Clear();
                status = __BT_FUNC_STATUS_ERROR;
                goto end;
@@ -474,7 +476,7 @@ PyObject *bt_bt2_graph_add_ports_connected_listener(struct bt_graph *graph,
 {
        PyObject *py_listener_ids = NULL;
        PyObject *py_listener_id = NULL;
-       int listener_id;
+       bt_listener_id listener_id;
        bt_graph_add_listener_status status;
        const char * const module_name =
                "graph_add_ports_connected_listener() (Python)";
@@ -503,7 +505,7 @@ PyObject *bt_bt2_graph_add_ports_connected_listener(struct bt_graph *graph,
                goto error;
        }
 
-       py_listener_id = PyLong_FromLong(listener_id);
+       py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
        if (!py_listener_id) {
                BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                        "Failed to allocate one PyLong.");
@@ -525,7 +527,7 @@ PyObject *bt_bt2_graph_add_ports_connected_listener(struct bt_graph *graph,
                goto error;
        }
 
-       py_listener_id = PyLong_FromLong(listener_id);
+       py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
        if (!py_listener_id) {
                BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                        "Failed to allocate one PyLong.");
@@ -547,7 +549,7 @@ PyObject *bt_bt2_graph_add_ports_connected_listener(struct bt_graph *graph,
                goto error;
        }
 
-       py_listener_id = PyLong_FromLong(listener_id);
+       py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
        if (!py_listener_id) {
                BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                        "Failed to allocate one PyLong.");
@@ -569,7 +571,7 @@ PyObject *bt_bt2_graph_add_ports_connected_listener(struct bt_graph *graph,
                goto error;
        }
 
-       py_listener_id = PyLong_FromLong(listener_id);
+       py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
        if (!py_listener_id) {
                BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                        "Failed to allocate one PyLong.");
This page took 0.025077 seconds and 4 git commands to generate.