mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 16:38:54 +02:00
Remove G_HARDCODED_PATH_WRAPPER, Owen didn't like it.
2001-10-23 Tor Lillqvist <tml@iki.fi> * glib/gutils.h: Remove G_HARDCODED_PATH_WRAPPER, Owen didn't like it. * glib/gutils.c: Instead, expand it on Win32 as _glib_get_locale_dir(), and #define GLIB_LOCALE_DIR as a call to it.
This commit is contained in:
committed by
Tor Lillqvist
parent
3984621bd3
commit
0c9c94c6e1
@@ -1093,8 +1093,25 @@ g_get_codeset (void)
|
||||
|
||||
#include <libintl.h>
|
||||
|
||||
#ifdef G_PLATFORM_WIN32
|
||||
|
||||
G_WIN32_DLLMAIN_FOR_DLL_NAME (static, dll_name)
|
||||
G_HARDCODED_PATH_WRAPPER (GLIB_LOCALE_DIR, GETTEXT_PACKAGE, _glib_get_locale_dir, dll_name, "lib/locale")
|
||||
|
||||
static const gchar *
|
||||
_glib_get_locale_dir (void)
|
||||
{
|
||||
static const gchar *cache = NULL;
|
||||
if (cache == NULL)
|
||||
cache = g_win32_get_package_installation_subdirectory
|
||||
(GETTEXT_PACKAGE, dll_name, "lib\\locale");
|
||||
|
||||
return cache;
|
||||
}
|
||||
|
||||
#undef GLIB_LOCALE_DIR
|
||||
#define GLIB_LOCALE_DIR _glib_get_locale_dir ()
|
||||
|
||||
#endif /* G_PLATFORM_WIN32 */
|
||||
|
||||
G_CONST_RETURN gchar *
|
||||
_glib_gettext (const gchar *str)
|
||||
@@ -1103,7 +1120,7 @@ _glib_gettext (const gchar *str)
|
||||
|
||||
if (!_glib_gettext_initialized)
|
||||
{
|
||||
bindtextdomain(GETTEXT_PACKAGE, _glib_get_locale_dir ());
|
||||
bindtextdomain(GETTEXT_PACKAGE, GLIB_LOCALE_DIR);
|
||||
_glib_gettext_initialized = TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user