--- a/gplugin/gplugin-manager.c Mon Jan 28 00:48:09 2019 +0000
+++ b/gplugin/gplugin-manager.c Fri Feb 01 02:23:51 2019 +0000
@@ -1228,8 +1228,7 @@
* Gets the list of paths which will be search for plugins.
* Return value: (element-type utf8) (transfer none): list of paths which will
- * be searched for plugins. free the list with g_list_free when
+ * be searched for plugins. gplugin_manager_get_paths(void) {
--- a/gplugin/gplugin-native-loader.c Mon Jan 28 00:48:09 2019 +0000
+++ b/gplugin/gplugin-native-loader.c Fri Feb 01 02:23:51 2019 +0000
@@ -107,21 +107,27 @@
GPluginPluginInfo *info = NULL;
*module = gplugin_native_loader_open(filename, flags, error);
- if((*module == NULL) || (error && *error))
+ } else if (error && *error) { + g_module_close(*module); *query = gplugin_native_loader_lookup_symbol(*module, GPLUGIN_QUERY_SYMBOL,
if((*query == NULL) || (error && *error)) {
info = ((GPluginNativePluginQueryFunc)(*query))(error);
@@ -143,9 +149,6 @@
info = gplugin_native_loader_open_and_query(filename, &module, 0, &query,
if(!GPLUGIN_IS_PLUGIN_INFO(info)) {
- g_module_close(module);
if (error && *error == NULL) {
g_set_error_literal(error, GPLUGIN_DOMAIN, 0,
_("the query function did not return a "
@@ -163,8 +166,6 @@
if(!GPLUGIN_IS_PLUGIN_INFO(info)) {
- g_module_close(module);
if (error && *error == NULL) {
g_set_error_literal(error, GPLUGIN_DOMAIN, 0,
_("the query function did not return a "
--- a/gplugin/tests/dynamic-type/dynamic-type-user.c Mon Jan 28 00:48:09 2019 +0000
+++ b/gplugin/tests/dynamic-type/dynamic-type-user.c Fri Feb 01 02:23:51 2019 +0000
@@ -51,10 +51,14 @@
-gplugin_unload(G_GNUC_UNUSED GPluginNativePlugin *plugin, GError **error) {
+gplugin_unload(G_GNUC_UNUSED GPluginNativePlugin *plugin, GError **error) + gpointer weak_test_object = test_object; + g_object_add_weak_pointer(G_OBJECT(test_object), &weak_test_object); g_object_unref(test_object);
- if (DYNAMIC_IS_TEST(test_object)) {
+ if (DYNAMIC_IS_TEST(weak_test_object)) { g_set_error(error, GPLUGIN_DOMAIN, 0,
"test_object is still valid");
--- a/gplugin/tests/test-plugin-manager-paths.c Mon Jan 28 00:48:09 2019 +0000
+++ b/gplugin/tests/test-plugin-manager-paths.c Fri Feb 01 02:23:51 2019 +0000
@@ -106,7 +106,6 @@
for(l = paths; l; l = l->next) {
g_hash_table_remove(req, l->data);
size = g_hash_table_size(req);
@@ -142,7 +141,6 @@
paths = gplugin_manager_get_paths();
for(l = paths; l != NULL; l = l->next)
g_hash_table_remove(req, l->data);
/* now check the hash table size, if it's > 0 then an expected path wasn't