[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: Hyrum K. Wright <hyrum_at_hyrumwright.org>
Date: Tue, 28 Jul 2009 19:58:27 -0500

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()".

You dig?

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2376460
Received on 2009-07-29 02:59:03 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.