Julian Foad <julianfoad@btopenworld.com> writes:
> It looks like the "for" loop in this code is just wasting time. Am I right?
It could conceivably be moving things from one pool to another... But
no, I don't think it is, or isn't doing it correctly, if that's its
intention. And, depending on the allocation promises of
ra_lib->rev_proplist, such a transfer may not even be necessary!
Weird. What happens if you yank the loop?
-K
> subversion/libsvn_client/prop_commands.c:
>
> svn_error_t *
> svn_client_revprop_list (apr_hash_t **props,
> const char *URL,
> const svn_opt_revision_t *revision,
> svn_revnum_t *set_rev,
> svn_client_ctx_t *ctx,
> apr_pool_t *pool)
> {
> void *ra_baton, *session;
> svn_ra_plugin_t *ra_lib;
> apr_hash_t *proplist;
> apr_hash_index_t *hi;
>
> [...]
>
> /* The actual RA call. */
> SVN_ERR (ra_lib->rev_proplist (session, *set_rev, &proplist, pool));
>
> for (hi = apr_hash_first (pool, proplist); hi; hi = apr_hash_next (hi))
> {
> const void *key;
> void *val;
> apr_ssize_t klen;
>
> apr_hash_this (hi, &key, &klen, &val);
> apr_hash_set (proplist, key, klen, val);
> }
>
> *props = proplist;
> return SVN_NO_ERROR;
> }
>
> - Julian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 10 20:44:54 2003