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:
Tor Lillqvist
2001-10-23 09:26:54 +00:00
committed by Tor Lillqvist
parent 3984621bd3
commit 0c9c94c6e1
10 changed files with 99 additions and 53 deletions

View File

@@ -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;
}