--- a/gplugin/gplugin-file-tree.c Fri Feb 01 02:23:51 2019 +0000
+++ b/gplugin/gplugin-file-tree.c Sat Feb 02 07:37:10 2019 +0000
@@ -60,10 +60,12 @@
*****************************************************************************/
-gplugin_file_tree_free_leaves(GNode *n, G_GNUC_UNUSED gpointer d) {
+gplugin_file_tree_free_leaves(GNode *n, gpointer d) { GPluginFileTreeEntry *e = n->data;
- gplugin_file_tree_entry_free(e);
+ gplugin_file_tree_entry_free(e); @@ -144,12 +146,10 @@
gplugin_file_tree_free(GNode *root) {
- g_node_traverse(root, G_POST_ORDER, G_TRAVERSE_LEAVES, -1,
- gplugin_file_tree_free_leaves, NULL);
- g_node_traverse(root, G_POST_ORDER, G_TRAVERSE_NON_LEAVES, -1,
- gplugin_file_tree_free_non_leaves, NULL);
+ g_node_traverse(root, G_POST_ORDER, G_TRAVERSE_LEAVES, -1, + gplugin_file_tree_free_leaves, root); + g_node_traverse(root, G_POST_ORDER, G_TRAVERSE_NON_LEAVES, -1, + gplugin_file_tree_free_non_leaves, NULL); --- a/gplugin/gplugin-manager.c Fri Feb 01 02:23:51 2019 +0000
+++ b/gplugin/gplugin-manager.c Sat Feb 02 07:37:10 2019 +0000
@@ -477,9 +477,9 @@
/* now insert into our view */
- g_hash_table_insert(manager->plugins_filename_view,
- g_object_ref(G_OBJECT(plugin)));
+ g_hash_table_replace(manager->plugins_filename_view, + g_object_ref(G_OBJECT(plugin))); /* Grab the list of plugins with our id and prepend the new
* plugin to it before updating it.
@@ -487,10 +487,12 @@
l = g_hash_table_lookup(manager->plugins, id);
for(ll = l; ll; ll = ll->next) {
GPluginPlugin *splugin = GPLUGIN_PLUGIN(ll->data);
- const gchar *sfilename = gplugin_plugin_get_filename(splugin);
+ gchar *sfilename = gplugin_plugin_get_filename(splugin); if(!g_strcmp0(real_filename, sfilename))
l = g_slist_prepend(l, g_object_ref(plugin));
@@ -639,8 +641,12 @@
/* now look for a plugin matching the id */
matches = gplugin_manager_find_plugins(oid);
/* now iterate the matches and check if we need to check their
@@ -699,6 +705,10 @@
@@ -1056,7 +1066,7 @@
* a value of the plugin itself.
manager->plugins_filename_view =
- g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_object_unref);
+ g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_object_unref); /* The loaders hash table is keyed on the supported extensions of the
* loader. Which means that a loader that supports multiple extensions
--- a/gplugin/gplugin-version.c Fri Feb 01 02:23:51 2019 +0000
+++ b/gplugin/gplugin-version.c Sat Feb 02 07:37:10 2019 +0000
@@ -107,6 +107,8 @@
*extra = g_match_info_fetch_named(info, "extra");
+ g_match_info_unref(info); --- a/gplugin/tests/test-option-group.c Fri Feb 01 02:23:51 2019 +0000
+++ b/gplugin/tests/test-option-group.c Sat Feb 02 07:37:10 2019 +0000
@@ -29,15 +29,13 @@
GOptionGroup *group = NULL;
GList *paths = NULL, *l1 = NULL, *l2 = NULL;
argv = g_strsplit(args, ",", 0);
- argc = g_strv_length(argv);
ctx = g_option_context_new(NULL);
group = gplugin_get_option_group();
g_option_context_add_group(ctx, group);
- g_option_context_parse(ctx, &argc, &argv, &error);
+ g_option_context_parse_strv(ctx, &argv, &error); g_option_context_free(ctx);
--- a/gplugin/tests/test-plugin-info.c Fri Feb 01 02:23:51 2019 +0000
+++ b/gplugin/tests/test-plugin-info.c Sat Feb 02 07:37:10 2019 +0000
@@ -66,6 +66,7 @@
for(i = 0; expected[i]; i++)
g_assert_cmpstr(tmp[i], ==, expected[i]);
--- a/python/gplugin-python-loader.c Fri Feb 01 02:23:51 2019 +0000
+++ b/python/gplugin-python-loader.c Sat Feb 02 07:37:10 2019 +0000
@@ -50,7 +50,7 @@
-gplugin_python_loader_query(G_GNUC_UNUSED GPluginLoader *loader,
+gplugin_python_loader_query(GPluginLoader *loader, G_GNUC_UNUSED GError **error)
@@ -82,6 +82,10 @@
g_warning(_("Failed to query %s"), filename);
+ /* clean some stuff up */ + Py_DECREF(package_list); pyg_gil_state_release(state);
@@ -101,6 +105,7 @@
g_warning(_("Failed to find the gplugin_query function in %s"),
pyg_gil_state_release(state);
@@ -110,6 +115,7 @@
pyg_gil_state_release(state);
@@ -120,6 +126,7 @@
g_warning(_("Failed to find the gplugin_load function in %s"),
pyg_gil_state_release(state);
@@ -129,6 +136,7 @@
pyg_gil_state_release(state);
@@ -139,6 +147,7 @@
g_warning(_("Failed to find the gplugin_unload function in %s"),
pyg_gil_state_release(state);
@@ -148,6 +157,7 @@
pyg_gil_state_release(state);
@@ -172,6 +182,9 @@
pyg_gil_state_release(state);
@@ -193,10 +206,14 @@
result = PyObject_CallFunctionObjArgs(load, pyplugin, NULL);
- *error = gplugin_python_exception_to_gerror();
+ if (PyErr_Occurred()) { + *error = gplugin_python_exception_to_gerror(); ret = PyObject_IsTrue(result);
@@ -228,7 +245,7 @@
@@ -255,6 +272,7 @@
PyErr_Fetch(&type, &value, &tb);
obj = PyUnicode_AsUTF8String(value);
@@ -277,7 +295,7 @@
gplugin_python_loader_init_gettext(void) {
PyObject *module_dict = NULL, *install = NULL;
- PyObject *gettext = NULL, *gettext_args = NULL;
+ PyObject *gettext = NULL, *result = NULL; gettext = PyImport_ImportModule("gettext");
@@ -288,9 +306,9 @@
module_dict = PyModule_GetDict(gettext);
install = PyDict_GetItemString(module_dict, "install");
- gettext_args = Py_BuildValue("ss", GETTEXT_PACKAGE, LOCALEDIR);
- PyObject_CallObject(install, gettext_args);
- Py_DECREF(gettext_args);
+ result = PyObject_CallFunction(install, "ss", GETTEXT_PACKAGE, LOCALEDIR); --- a/python/gplugin-python-test-pygobject.c Fri Feb 01 02:23:51 2019 +0000
+++ b/python/gplugin-python-test-pygobject.c Sat Feb 02 07:37:10 2019 +0000
@@ -39,8 +39,10 @@
wargv[0] = g_new0(wchar_t, len + 1);
len = mbstowcs(wargv[0], argv[0], len + 1);
+ if(len == (size_t)-1) { #if PY_VERSION_HEX < 0x03010300