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

Re: WC-NG question: ctx->wc_ctx docs

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 30 Sep 2009 17:48:48 +0100

On Tue, 2009-07-28 at 19:58 -0500, Hyrum K. Wright wrote:
> On Jul 28, 2009, at 1:10 PM, C. Michael Pilato wrote:
>
> > Reading in svn_client.h, I see:
> >
> > /** An optional working copy context for the client operation to use.
> > * This is initialized by svn_client_create_context() and should
> > never
> > * be @c NULL.
> > *
> > * @since New in 1.7. */
> > svn_wc_context_t *wc_ctx;
> >
> > Can someone help me interpret this? If the wc_ctx pointer is
> > "optional",
> > then what (if not NULL) is its value when the structure initializer
> > "opts
> > out" on this field?
>
> Yeah, something there doesn't parse quite right. Here's the skinny:
>
> 1.7-era libsvn_client will initialize the value, and since it's
> assumed that the same version of the library which initialized it will
> always be using it, all 1.7-era APIs also assume it is non-NULL.
> Previous versions of the library obviously have no notion of wc_ctx,
> will not initialize the value (heck, won't even allocate memory for
> it), and won't ever use it.
>
> So the docstring should probably be updated to say something like
> "this always get initialized inside of svn_client_create_context()".

I removed the word "optional" in r39712.

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2402175
Received on 2009-09-30 18:49:07 CEST

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.