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

Re: svn commit: r35361 - in trunk/subversion: include libsvn_ra libsvn_ra_neon libsvn_ra_serf libsvn_ra_svn libsvn_repos libsvn_subr mod_dav_svn/reports svn svnserve

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 21 Jan 2009 12:42:49 +0100

On Wed, Jan 21, 2009 at 12:24, Bert Huijben <rhuijben_at_sharpsvn.net> wrote:
>...
> +++ trunk/subversion/libsvn_subr/constructors.c Wed Jan 21 03:24:22 2009 (r35361)
> @@ -158,6 +158,57 @@ svn_log_entry_create(apr_pool_t *pool)
> return log_entry;
> }
>
> +svn_log_entry_t *
> +svn_log_entry_dup(svn_log_entry_t *log_entry, apr_pool_t *pool)
> +{
> + apr_hash_index_t *hi;
> + svn_log_entry_t *new_entry = svn_log_entry_create(pool);
> +
> + *new_entry = *log_entry;
> +
> + if (log_entry->revprops)
> + {
> + new_entry->revprops = apr_hash_make(pool);
> +
> + for (hi = apr_hash_first(pool, log_entry->revprops);
> + hi; hi = apr_hash_next(hi))
> + {
> + const char *key;
> + svn_string_t *prop;
> +
> + apr_hash_this(hi, (const void**)&key, NULL, (void**)&prop);

I think that we've said this form is not allowed. Instead, just make
the variables the proper type, and they'll get cast appropriately in
the call below:

> + apr_hash_set(new_entry->revprops, apr_pstrdup(pool, key),
> + APR_HASH_KEY_STRING, svn_string_dup(prop, pool));

apr_pstrdup() and svn_string_dup() will take the void* arguments and
cast them appropriately.

> + }
> + }
> +
> + if (log_entry->changed_paths2)
> + {
> + new_entry->changed_paths2 = apr_hash_make(pool);
> +
> + for (hi = apr_hash_first(pool, log_entry->changed_paths);
> + hi; hi = apr_hash_next(hi))

apr_hash_first on paths2.

> + {
> + const char *key;
> + svn_log_changed_path2_t *change;
> +
> + apr_hash_this(hi, (const void**)&key, NULL, (void**)&change);
> +
> + apr_hash_set(new_entry->changed_paths, apr_pstrdup(pool, key),

set on paths2.

>...

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1040913
Received on 2009-01-21 12:43:04 CET

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.