#include <babeltrace/graph/component-class-internal.h>
#include <babeltrace/types.h>
#include <babeltrace/list-internal.h>
+#include <babeltrace/assert-internal.h>
#include <string.h>
#include <stdlib.h>
#include <glib.h>
{
struct bt_plugin_so_shared_lib_handle *shared_lib_handle;
- assert(obj);
+ BT_ASSERT(obj);
shared_lib_handle = container_of(obj,
struct bt_plugin_so_shared_lib_handle, base);
const char *path = shared_lib_handle->path ?
goto error;
}
- bt_object_init(shared_lib_handle, bt_plugin_so_shared_lib_handle_destroy);
+ bt_object_init_shared(&shared_lib_handle->base,
+ bt_plugin_so_shared_lib_handle_destroy);
if (!path) {
goto end;
return;
}
- assert(plugin->type == BT_PLUGIN_TYPE_SO);
- assert(spec);
+ BT_ASSERT(plugin->type == BT_PLUGIN_TYPE_SO);
+ BT_ASSERT(spec);
BT_PUT(spec->shared_lib_handle);
g_free(plugin->spec_data);
plugin->spec_data = NULL;
bt_component_class_accept_port_connection_method accept_port_connection_method;
bt_component_class_port_connected_method port_connected_method;
bt_component_class_port_disconnected_method port_disconnected_method;
- struct bt_component_class_iterator_methods iterator_methods;
+ struct bt_component_class_notification_iterator_methods iterator_methods;
};
enum bt_plugin_status status = BT_PLUGIN_STATUS_OK;
{
struct bt_plugin_so_spec_data *spec = plugin->spec_data;
- assert(plugin->spec_data);
- assert(plugin->type == BT_PLUGIN_TYPE_SO);
+ BT_ASSERT(plugin->spec_data);
+ BT_ASSERT(plugin->type == BT_PLUGIN_TYPE_SO);
bt_list_add(&comp_class->node, &component_class_list);
comp_class->so_handle = bt_get(spec->shared_lib_handle);