[epiphany] Mark string parameters in ephy_session_queue_command() as const



commit 016b6995843919814f3768487ca161031d778d06
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Sat Jun 25 19:54:10 2011 +0300

    Mark string parameters in ephy_session_queue_command() as const
    
    ephy_session_queue_command() doesn't take over the strings it
    receives, so mark these as const for clarity.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=622903

 src/ephy-application.c |    6 +++---
 src/ephy-session.c     |    2 +-
 src/ephy-session.h     |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/ephy-application.c b/src/ephy-application.c
index ecf4d44..8ae9f7f 100644
--- a/src/ephy-application.c
+++ b/src/ephy-application.c
@@ -121,7 +121,7 @@ queue_commands (EphyApplication *application)
   else if (ctx->session_filename != NULL) {
     ephy_session_queue_command (session,
                                 EPHY_SESSION_CMD_LOAD_SESSION,
-                                ctx->session_filename, NULL,
+                                (const char *)ctx->session_filename, NULL,
                                 ctx->user_time, FALSE);
   } else if (ctx->arguments != NULL) {
     /* Don't queue any window openings if no extra arguments given, */
@@ -139,8 +139,8 @@ queue_commands (EphyApplication *application)
 
     ephy_session_queue_command (session,
                                 EPHY_SESSION_CMD_OPEN_URIS,
-                                options->str,
-                                ctx->arguments,
+                                (const char*)options->str,
+                                (const char **)ctx->arguments,
                                 ctx->user_time, FALSE);
   }
 }
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 9e489d0..0c7b2a9 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -1744,7 +1744,7 @@ void
 ephy_session_queue_command (EphySession *session,
 			    EphySessionCommand command,
 			    const char *arg,
-			    char **args,
+			    const char **args,
 			    guint32 user_time,
 			    gboolean priority)
 {
diff --git a/src/ephy-session.h b/src/ephy-session.h
index 4dbb496..3bf1ffd 100644
--- a/src/ephy-session.h
+++ b/src/ephy-session.h
@@ -92,7 +92,7 @@ void		 ephy_session_remove_window	(EphySession *session,
 void		 ephy_session_queue_command	(EphySession *session,
 						 EphySessionCommand op,
 						 const char *arg,
-						 char **args,
+						 const char **args,
 						 guint32 user_time,
 						 gboolean priority);
 



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