Coverage Report

Created: 2025-06-13 06:55

/src/glib/gmodule/gmodule-deprecated.c
Line
Count
Source (jump to first uncovered line)
1
#include "config.h"
2
3
/* 
4
 * This is the only way to disable deprecation warnings for macros, and we need
5
 * to continue using G_MODULE_SUFFIX in the implementation of
6
 * g_module_build_path() which is also deprecated API.
7
 */
8
#ifndef GLIB_DISABLE_DEPRECATION_WARNINGS
9
#define GLIB_DISABLE_DEPRECATION_WARNINGS
10
#endif
11
12
#include <glib.h>
13
14
#if (G_MODULE_IMPL == G_MODULE_IMPL_AR) || (G_MODULE_IMPL == G_MODULE_IMPL_DL)
15
G_GNUC_INTERNAL gchar*    _g_module_build_path (const gchar *directory,
16
                                                const gchar *module_name);
17
18
gchar*
19
_g_module_build_path (const gchar *directory,
20
          const gchar *module_name)
21
0
{
22
0
  if (directory && *directory) {
23
0
    if (strncmp (module_name, "lib", 3) == 0)
24
0
      return g_strconcat (directory, "/", module_name, NULL);
25
0
    else
26
0
      return g_strconcat (directory, "/lib", module_name, "." G_MODULE_SUFFIX, NULL);
27
0
  } else if (strncmp (module_name, "lib", 3) == 0)
28
0
    return g_strdup (module_name);
29
0
  else
30
0
    return g_strconcat ("lib", module_name, "." G_MODULE_SUFFIX, NULL);
31
0
}
32
#endif