Removed deprecated api g_module_build_path 96/307796/1 accepted/tizen/unified/20240313.134930 accepted/tizen/unified/20240313.135831 accepted/tizen/unified/20240315.032935 accepted/tizen/unified/20240322.174348 accepted/tizen/unified/x/20240314.073425
authorPriya Kohli <priya.kohli@samsung.com>
Wed, 13 Mar 2024 06:47:10 +0000 (12:17 +0530)
committerPriya Kohli <priya.kohli@samsung.com>
Wed, 13 Mar 2024 06:47:10 +0000 (12:17 +0530)
Change-Id: I5d8f6853f69dd2fa08614af2eb79b64bc030948b
Signed-off-by: Priya Kohli <priya.kohli@samsung.com>
location/module/module-internal.c

index 3aea4a9..dc9ad46 100755 (executable)
 
 #define MODULE_PATH_PREFIX LIBDIR"/location/module"
 
+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);
+}
+
 static GMod *gmod_new(const char *module_name, gboolean is_resident)
 {
        if (!module_name)
@@ -46,7 +59,7 @@ static GMod *gmod_new(const char *module_name, gboolean is_resident)
 
        char *module_path = g_strndup(MODULE_PATH_PREFIX, strlen(MODULE_PATH_PREFIX)+1);
        /* gmod->path = g_module_build_path(MODULE_PATH_PREFIX, gmod->name); */
-       gmod->path = g_module_build_path(module_path, gmod->name);
+       gmod->path = _g_module_build_path(module_path, gmod->name);
        g_free(module_path);
        if (!gmod->path) {
                g_free(gmod->name);