[glib] Update gsettings utilities in GIO



commit 09c98f18fcfdaa58864ef127788cbf6332728a94
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Jun 7 10:49:29 2011 +0800

    Update gsettings utilities in GIO
    
    Avoid C99-style variable declaration

 gio/glib-compile-schemas.c |    9 +++++++--
 gio/gsettings-tool.c       |    7 ++++++-
 2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
index 0c8a58d..8d20bbf 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
@@ -1947,11 +1947,16 @@ main (int argc, char **argv)
     { NULL }
   };
 
+#ifdef G_OS_WIN32
+  extern gchar *_glib_get_locale_dir (void);
+  gchar *tmp;
+#endif
+
   setlocale (LC_ALL, "");
   textdomain (GETTEXT_PACKAGE);
+
 #ifdef G_OS_WIN32
-  extern gchar *_glib_get_locale_dir (void);
-  gchar *tmp = _glib_get_locale_dir ();
+  tmp = _glib_get_locale_dir ();
   bindtextdomain (GETTEXT_PACKAGE, tmp);
   g_free (tmp);
 #else
diff --git a/gio/gsettings-tool.c b/gio/gsettings-tool.c
index 04a1954..087288d 100644
--- a/gio/gsettings-tool.c
+++ b/gio/gsettings-tool.c
@@ -690,11 +690,16 @@ main (int argc, char **argv)
   GSettings *settings;
   const gchar *key;
 
+#ifdef G_OS_WIN32
+  extern gchar *_glib_get_locale_dir (void);
+  gchar *tmp;
+#endif
+
   setlocale (LC_ALL, "");
   textdomain (GETTEXT_PACKAGE);
 
 #ifdef G_OS_WIN32
-  gchar *tmp = _glib_get_locale_dir ();
+  tmp = _glib_get_locale_dir ();
   bindtextdomain (GETTEXT_PACKAGE, tmp);
   g_free (tmp);
 #else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]