[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] #1 Update on port to OS400/EBCDIC

From: Branko Čibej <brane_at_xbc.nu>
Date: 2006-02-11 00:24:47 CET

Branko Čibej wrote:
> Paul Burba wrote:
>> But I confess I'm a bit uneasy about how I modify argv. I pass &argv
>> to svn_cmdline_args_from_ebcdic(), convert the args to utf-8 in a
>> separately allocated char ** and then cast away argv's "constness" so
>> I can point it at the converted char **. Is avoiding const like this
>> legit? (Somewhere in the back of my head the ghostly voice of a CS
>> TA is saying "Woooo...don't cast away a const!" :-)
> The canonical prototype for main() is:
>
> int main (int argc, const char *argv[]);
>
> So, argv is an array of pointers to const char, but the argv array
> itself is _not_ unmodifiable.
Interestingly enough, we have the same kind of wrong-headed code in
find_tunnel_agent() in libsvn_ra_svn/client.c ...

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 11 00:25:33 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.