[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 2092 - trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_subr trunk/subversion/libsvn_client trunk/subversion/tests/libsvn_wc

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-06-06 03:09:15 CEST

On Wed, Jun 05, 2002 at 01:40:39PM -0500, kfogel@tigris.org wrote:
>...
> +++ trunk/subversion/include/svn_wc.h Wed Jun 5 13:40:22 2002
> @@ -687,6 +687,12 @@
>
> /* Set *EDITOR and *EDIT_BATON to an editor and baton for updating a
> * working copy.
> + *
> + * If TRAVERSAL_INFO is non-null, set *TRAVERSAL_INFO to an object
> + * suitable for use by post-update accessor functions, such as
> + * svn_wc_edited_externals(). The traversal info has the same
> + * lifetime as POOL, but is useable only after (*EDITOR)->close_edit
> + * has been called.
> *
> * ANCHOR is the local path to the working copy which will be used as
> * the root of our editor. TARGET is the entry in ANCHOR that will
> @@ -701,6 +707,7 @@
> svn_boolean_t recurse,
> const svn_delta_editor_t **editor,
> void **edit_baton,
> + void **traversal_info,

Batons are pointers to arbitrary data. The traversal information doesn't
follow that pattern, so I think you should make the type explicit. Let the
compiler ensure that the correct structure is passed around. In other words:

  typedef struct svn_wc_traversal_info svn_wc_traversal_info;

And then define the structure in libsvn_wc/something_or_other

>...
> +++ trunk/subversion/libsvn_wc/update_editor.c Wed Jun 5 13:40:24 2002
> @@ -52,6 +52,24 @@
>
> /*** batons ***/
>
> +struct traversal_info
> +{

Looks like 'struct svn_wc_traversal_info' would be defined in this .c file,
rather than a header.

>...
> +++ trunk/subversion/libsvn_subr/hash.c Wed Jun 5 13:40:25 2002
>...
> +apr_size_t
> +svn_unpack_bytestring (char **returndata, void *value)
> +{
> + svn_stringbuf_t *valstring = (svn_stringbuf_t *) value;
> +
> + *returndata = valstring->data;
> +
> + return (size_t) valstring->len;

Unrelated, but that cast should not be present. ->len is already of the
appropriate type, and (size_t) doesn't match the return type anyways.

>...
> +++ trunk/subversion/libsvn_client/externals.c Wed Jun 5 13:40:29 2002
>...
> + /* What revision to check out. Only svn_client_revision_number,
> + svn_client_revision_date, and svn_client_revision_head are
> + valid. ### Any reason to change this to inline, instead of
> + pointer? */
> + svn_client_revision_t *revision;

I'd recommend making it inline. It simplifies the setup of the structures
(single alloc rather than multiple and hooking them together).

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 6 03:23:05 2002

This is an archived mail posted to the Subversion Dev mailing list.