changeset 16830:d137600880f6

sh-quote: Improve shell_quote_argv's signature. * lib/sh-quote.h (shell_quote_argv): Make argument array a 'const *'. * lib/sh-quote.c (shell_quote_argv): Likewise.
author Bruno Haible <bruno@clisp.org>
date Mon, 07 May 2012 03:31:32 +0200
parents 5891d985e4e9
children f9fc08c5e5c2
files ChangeLog lib/sh-quote.c lib/sh-quote.h
diffstat 3 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-06  Bruno Haible  <bruno@clisp.org>
+
+	sh-quote: Improve shell_quote_argv's signature.
+	* lib/sh-quote.h (shell_quote_argv): Make argument array a 'const *'.
+	* lib/sh-quote.c (shell_quote_argv): Likewise.
+
 2012-05-06  Paul Eggert  <eggert@cs.ucla.edu>
 
 	stdint: document issues with int_fast8_t etc.
--- a/lib/sh-quote.c
+++ b/lib/sh-quote.c
@@ -69,11 +69,11 @@
 /* Returns a freshly allocated string containing all argument strings, quoted,
    separated through spaces.  */
 char *
-shell_quote_argv (char **argv)
+shell_quote_argv (char * const *argv)
 {
   if (*argv != NULL)
     {
-      char **argp;
+      char * const *argp;
       size_t length;
       char *command;
       char *p;
--- a/lib/sh-quote.h
+++ b/lib/sh-quote.h
@@ -33,4 +33,4 @@
 
 /* Returns a freshly allocated string containing all argument strings, quoted,
    separated through spaces.  */
-extern char * shell_quote_argv (char **argv);
+extern char * shell_quote_argv (char * const *argv);