-BT_HIDDEN
-struct bt_plugin *bt_plugin_create_empty(enum bt_plugin_type type)
-{
- struct bt_plugin *plugin = NULL;
-
- plugin = g_new0(struct bt_plugin, 1);
- if (!plugin) {
- goto error;
- }
-
- bt_object_init(plugin, bt_plugin_destroy);
- plugin->type = type;
-
- /* Create empty array of component classes */
- plugin->comp_classes =
- g_ptr_array_new_with_free_func((GDestroyNotify) bt_put);
- if (!plugin->comp_classes) {
- goto error;
- }
-
- /* Create empty info */
- plugin->info.name = g_string_new(NULL);
- if (!plugin->info.name) {
- goto error;
- }
-
- plugin->info.path = g_string_new(NULL);
- if (!plugin->info.path) {
- goto error;
- }
-
- plugin->info.description = g_string_new(NULL);
- if (!plugin->info.description) {
- goto error;
- }
-
- plugin->info.author = g_string_new(NULL);
- if (!plugin->info.author) {
- goto error;
- }
-
- plugin->info.license = g_string_new(NULL);
- if (!plugin->info.license) {
- goto error;
- }
-
- plugin->info.version.extra = g_string_new(NULL);
- if (!plugin->info.version.extra) {
- goto error;
+__attribute__((destructor)) static
+void fini_python_plugin_provider(void) {
+ if (python_plugin_provider_module) {
+ (void) g_module_close(python_plugin_provider_module);
+ python_plugin_provider_module = NULL;