Merge branch 'nirbheek/gmodule-suffix-deprecation' into 'main'

Improve g_module_open(), deprecate G_MODULE_SUFFIX

Closes #520 e #1413

See merge request GNOME/glib!2950
This commit is contained in:
Marco Trevisan
2022-10-27 16:27:42 +00:00
14 changed files with 169 additions and 71 deletions

View File

@@ -210,18 +210,3 @@ _g_module_symbol (gpointer handle,
return p;
}
static gchar*
_g_module_build_path (const gchar *directory,
const gchar *module_name)
{
if (directory && *directory) {
if (strncmp (module_name, "lib", 3) == 0)
return g_strconcat (directory, "/", module_name, NULL);
else
return g_strconcat (directory, "/lib", module_name, "." G_MODULE_SUFFIX, NULL);
} else if (strncmp (module_name, "lib", 3) == 0)
return g_strdup (module_name);
else
return g_strconcat ("lib", module_name, "." G_MODULE_SUFFIX, NULL);
}