apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: [PATCH] apr_getopt_long interface update and interleaving support
Date Sat, 25 Nov 2000 00:29:05 GMT
Greg Stein wrote:

> On Fri, Nov 24, 2000 at 06:46:25PM -0500, Greg Hudson wrote:
>> ...
>> -    char *const *argv;
>> +    char **argv;
> Um. I don't think we can do this with argv. I'm surprised that it isn't
> "const char * const * argv".
> Certainly, if we make a copy of the array (of pointers), then we could have
> "const char **argv" and that would allow us to permute.

If this pointer is supposed to be passed from main (which I guess it 
is), then you can't do that. Main's second argument must be "char 
*argv[]", and you can't convert that implicitly to "const char *const 
*argv" ; that would change the pointer's type.

So the change is fine.

Brane ─îibej
    home:   <brane@xbc.nu>             http://www.xbc.nu/brane/
    work:   <branko.cibej@hermes.si>   http://www.hermes-softlab.com/
     ACM:   <brane@acm.org>            http://www.acm.org/

View raw message