Author: rhuijben
Date: Thu May 12 10:51:12 2011
New Revision: 1102238
URL: http://svn.apache.org/viewvc?rev=1102238&view=rev
Log:
* subversion/include/private/svn_wc_private.h
(svn_wc__prop_list_recursive): Add a bit of constness.
* subversion/libsvn_client/externals.c
(externals_crawl_proplist_receiver): Use a hash function to find the
property, instead of using the hash as a slow array.
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/libsvn_client/externals.c
Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1102238&r1=1102237&r2=1102238&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Thu May 12
10:51:12 2011
@@ -686,9 +686,10 @@ typedef svn_error_t *(*svn_wc__proplist_
apr_pool_t *scratch_pool);
/** Call @a receiver_func, passing @a receiver_baton, an absolute path, and
- * a hash table mapping <tt>char *</tt> names onto <tt>svn_string_t *</tt>
- * values for all the regular properties of the node at @a local_abspath
- * and any node beneath @a local_abspath within the specified @a depth.
+ * a hash table mapping <tt>const char *</tt> names onto <tt>const
+ * svn_string_t *</tt> values for all the regular properties of the node
+ * at @a local_abspath and any node beneath @a local_abspath within the
+ * specified @a depth.
* If @a propname is not NULL, the passed hash table will only contain
* the property @a propname.
*
Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1102238&r1=1102237&r2=1102238&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Thu May 12 10:51:12
2011
@@ -1438,25 +1438,17 @@ externals_crawl_proplist_receiver(void *
apr_hash_t *props,
apr_pool_t *scratch_pool)
{
- apr_hash_index_t *hi;
- apr_hash_t *externals_hash = (apr_hash_t*)baton;
+ apr_hash_t *externals_hash = baton;
+ const svn_string_t *propval;
- for (hi = apr_hash_first(scratch_pool, props);
- hi;
- hi = apr_hash_next(hi))
- {
- const char *propname;
+ propval = apr_hash_get(props, SVN_PROP_EXTERNALS, APR_HASH_KEY_STRING);
- propname = svn__apr_hash_index_key(hi);
- if (strcmp(propname, SVN_PROP_EXTERNALS) == 0)
- {
- apr_pool_t *hash_pool = apr_hash_pool_get(externals_hash);
- svn_string_t *propval = svn__apr_hash_index_val(hi);
+ if (propval)
+ {
+ apr_pool_t *hash_pool = apr_hash_pool_get(externals_hash);
- apr_hash_set(externals_hash, apr_pstrdup(hash_pool, local_abspath),
- APR_HASH_KEY_STRING, svn_string_dup(propval,
hash_pool));
- break;
- }
+ apr_hash_set(externals_hash, apr_pstrdup(hash_pool, local_abspath),
+ APR_HASH_KEY_STRING, svn_string_dup(propval, hash_pool));
}
return SVN_NO_ERROR;