From: Bruno Haible Date: Mon, 7 May 2012 01:31:32 +0000 (+0200) Subject: sh-quote: Improve shell_quote_argv's signature. X-Git-Tag: v0.1~696 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=7d6f40656fa05ddc91ed194a455b96320cf94721;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 3b9037cd8..c23333f09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-05-06 Bruno Haible + + 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 stdint: document issues with int_fast8_t etc. diff --git a/lib/sh-quote.c b/lib/sh-quote.c index a35a574c9..4a8582ee1 100644 --- a/lib/sh-quote.c +++ b/lib/sh-quote.c @@ -69,11 +69,11 @@ shell_quote (const char *string) /* 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; diff --git a/lib/sh-quote.h b/lib/sh-quote.h index cefc014ee..a5515d791 100644 --- a/lib/sh-quote.h +++ b/lib/sh-quote.h @@ -33,4 +33,4 @@ extern char * shell_quote (const char *string); /* 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);