]> Pileus Git - ~andy/gtk/commitdiff
gtk_init_with_args() arguments should be const gchar*
authorNick Schermer <nick@xfce.org>
Mon, 26 Oct 2009 21:27:03 +0000 (22:27 +0100)
committerJavier Jardón <jjardon@gnome.org>
Mon, 26 Oct 2009 21:29:33 +0000 (22:29 +0100)
The translation_domain argument should be const gchar * to allow compilation
with -Wwrite-strings. It only passes the argument to
g_option_context_add_main_entries() which is already const gchar*.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=583305

gtk/gtkmain.c
gtk/gtkmain.h

index 645da6f8f24b0e949f80637987b79818e7316429..bfee6da93b31b179209c00c1f5ec8aea310de0a7 100644 (file)
@@ -849,9 +849,9 @@ gtk_get_option_group (gboolean open_default_display)
 gboolean
 gtk_init_with_args (int            *argc,
                    char         ***argv,
-                   char           *parameter_string,  
+                   const char     *parameter_string,
                    GOptionEntry   *entries,
-                   char           *translation_domain,
+                   const char     *translation_domain,
                    GError        **error)
 {
   GOptionContext *context;
index 975057e86484a69b808d4f9ad44352845399edc0..21de92ed42443c24da9b7af71ebe1436a4c2bf8c 100644 (file)
@@ -99,9 +99,9 @@ gboolean gtk_init_check           (int    *argc,
   
 gboolean gtk_init_with_args       (int            *argc,
                                   char         ***argv,
-                                  char           *parameter_string,
+                                  const char     *parameter_string,
                                   GOptionEntry   *entries,
-                                  char           *translation_domain,
+                                  const char     *translation_domain,
                                   GError        **error);
 
 GOptionGroup *gtk_get_option_group (gboolean open_default_display);