File: gmodule-deprecated.c

package info (click to toggle)
gobject-introspection 1.86.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 72,464 kB
  • sloc: ansic: 562,805; python: 23,750; xml: 16,240; perl: 1,878; yacc: 1,720; sh: 1,139; lex: 513; cpp: 487; makefile: 197; javascript: 15; lisp: 1
file content (32 lines) | stat: -rw-r--r-- 1,063 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "config.h"

/* 
 * This is the only way to disable deprecation warnings for macros, and we need
 * to continue using G_MODULE_SUFFIX in the implementation of
 * g_module_build_path() which is also deprecated API.
 */
#ifndef GLIB_DISABLE_DEPRECATION_WARNINGS
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#endif

#include <glib.h>

#if (G_MODULE_IMPL == G_MODULE_IMPL_AR) || (G_MODULE_IMPL == G_MODULE_IMPL_DL)
G_GNUC_INTERNAL gchar*    _g_module_build_path (const gchar *directory,
                                                const gchar *module_name);

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);
}
#endif