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

Re: API issues we might want to solve for 1.0

From: Ben Reser <ben_at_reser.org>
Date: 2003-12-15 00:40:46 CET

On Sun, Dec 14, 2003 at 06:05:02PM -0500, Garrett Rooney wrote:
> svn_client_ctx_create ?

That one had occured to me and I forgot to put it on the list.

> Some comments on the patch...
>
> +void
> +svn_client_open (svn_client_ctx_t **ctx,
> + apr_pool_t *pool)
> +{
> + *ctx = apr_pcalloc(pool,sizeof(svn_client_ctx_t));
> +}
>
> If this function cannot fail, it's considerably more readable to have
> it return a pointer to the svn_client_ctx_t than to have to pass it in
> as an argument to be filled in.
>
> On the other hand, perhaps it would make sense to have this function do
> some of the initialization of the svn_client_ctx_t for us, like reading
> in config files and things like that. In that case it could
> potentially fail, so you'd want to be able to return an svn_error_t *.

Maybe we should make it return an svn_error_t that's hard coded to
return SVN_NO_ERROR for the time being. Then if we ever need to add
code that could fail it wouldn't nessitate an API change.

svn_auth_open is the same way, perhaps that should be changed as well?

I'm starting to wonder if svn_auth_open was a bad example to follow.

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 15 00:41:54 2003

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.