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

Re: svn commit: rev 4574 - in trunk/subversion: include libsvn_auth

From: <brane_at_xbc.nu>
Date: 2003-01-27 20:08:36 CET

Greg Stein wrote:

+ svn_auth_cred_simple_t *creds = apr_pcalloc (pool, sizeof(*creds));
+ simple_prompt_iter_baton_t *ibaton = apr_pcalloc (pool, sizeof(*ibaton));
+ char *username, *password;

Why non-const? We don't intend to change these values, and it just means
that casts are needed later. I'd recommend altering the prototype on the
prompt function, rather than letting it's non-const return value monkey
stuff like this up.

Just a general comment: You never need a cast from a non-const to a
const of the same type. I have seen some such casts in our code, but we
shouldn't perpetuate this misconception.

Brane ─îibej   brane_at_xbc.nu   http://www.xbc.nu/brane/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:20:12 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.