2007-10-22 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (_glib_gettext): Plug small one-time leak on
Windows. (#488068, Daniel Atallah)
svn path=/trunk/; revision=5795
+2007-10-22 Tor Lillqvist <tml@novell.com>
+
+ * glib/gutils.c (_glib_gettext): Plug small one-time leak on
+ Windows. (#488068, Daniel Atallah)
+
2007-10-21 Behdad Esfahbod <behdad@gnome.org>
* glib/gdate.c (g_date_strftime):
* use system codepage as bindtextdomain() doesn't have a UTF-8
* interface.
*/
-static const gchar *
+static gchar *
_glib_get_locale_dir (void)
{
gchar *dir, *cp_dir;
}
#undef GLIB_LOCALE_DIR
-#define GLIB_LOCALE_DIR _glib_get_locale_dir ()
#endif /* G_OS_WIN32 */
if (!_glib_gettext_initialized)
{
+#ifdef G_OS_WIN32
+ gchar *tmp = _glib_get_locale_dir();
+ bindtextdomain(GETTEXT_PACKAGE, tmp);
+ g_free(tmp);
+#else
bindtextdomain(GETTEXT_PACKAGE, GLIB_LOCALE_DIR);
+#endif
# ifdef HAVE_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
# endif