gplugin/gplugin

Simplify hash tables used as sets

15 months ago, Elliott Sales de Andrade
c5dab25b756b
Parents ec766bf5a520
Children 7e519d51af72
Simplify hash tables used as sets

Testing Done:
Compiled and ran tests.

Reviewed at https://reviews.imfreedom.org/r/2178/
--- a/gplugin/tests/test-plugin-manager-paths.c Wed Dec 28 23:50:01 2022 -0600
+++ b/gplugin/tests/test-plugin-manager-paths.c Thu Jan 05 22:37:06 2023 -0600
@@ -162,14 +162,14 @@
/* create and add the paths we are expecting to the table */
path = g_build_filename(PREFIX, LIBDIR, "gplugin", G_DIR_SEPARATOR_S, NULL);
- g_hash_table_insert(req, path, GINT_TO_POINTER(FALSE));
+ g_hash_table_add(req, path);
path = g_build_filename(
g_get_user_config_dir(),
"gplugin",
G_DIR_SEPARATOR_S,
NULL);
- g_hash_table_insert(req, path, GINT_TO_POINTER(FALSE));
+ g_hash_table_add(req, path);
/* now tell the plugin manager to add the default paths */
gplugin_manager_add_default_paths(manager);
@@ -202,7 +202,7 @@
req = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
path = g_build_filename(prefix, LIBDIR, appname, G_DIR_SEPARATOR_S, NULL);
- g_hash_table_insert(req, path, GINT_TO_POINTER(FALSE));
+ g_hash_table_add(req, path);
path = g_build_filename(
g_get_user_config_dir(),
@@ -210,7 +210,7 @@
"plugins",
G_DIR_SEPARATOR_S,
NULL);
- g_hash_table_insert(req, path, GINT_TO_POINTER(FALSE));
+ g_hash_table_add(req, path);
/* now add the app paths */
gplugin_manager_add_app_paths(manager, prefix, "foo");