[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: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2003-12-15 00:05:02 CET

On Dec 14, 2003, at 5:36 PM, Ben Reser wrote:

> Done and attached. Some comments on this.
>
> * svn_client_open may not be the best name. I used that becasue we
> have svn_auth_open which roughly serves the same purpose. Ohter
> possible names that may be better are:
> svn_client_init (suggested in the comment above the svn_config_ensure
> call in main.c of the cmdline client).
> svn_client_create_context (suggested by ghudson, but seems long
> IMHO).
> svn_client_context_create (suggested by mbk, also long).

svn_client_ctx_create ?

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 *.

-garrett

---------------------------------------------------------------------
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:05:40 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.