On Fri, Oct 2, 2009 at 15:15, Hyrum K. Wright <hyrum_at_hyrumwright.org> wrote:
>...
> +++ trunk/subversion/libsvn_wc/copy.c  Fri Oct  2 12:15:29 2009     (r39770)
> @@ -60,14 +60,8 @@ copy_props(svn_wc__db_t *db,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool, scratch_pool));
> Â for (hi = apr_hash_first(scratch_pool, props); hi; hi = apr_hash_next(hi))
> Â Â {
> - Â Â Â const char *propname;
> - Â Â Â svn_string_t *propval;
> - Â Â Â const void *key;
> - Â Â Â void *val;
> -
> - Â Â Â apr_hash_this(hi, &key, NULL, &val);
> - Â Â Â propname = key;
> - Â Â Â propval = val;
> + Â Â Â const char *propname = svn_apr_hash_index_key(hi);
> + Â Â Â svn_string_t *propval = svn_apr_hash_index_val(hi);
const!!
>...
> +++ trunk/subversion/libsvn_wc/entries.c     Fri Oct  2 12:15:29 2009     (r39770)
>...
> @@ -1551,18 +1550,13 @@ prune_deleted(apr_hash_t **entries_prune
> Â Â Â Â hi;
> Â Â Â Â hi = apr_hash_next(hi))
> Â Â {
> - Â Â Â void *val;
> - Â Â Â const void *key;
> - Â Â Â const svn_wc_entry_t *entry;
> + Â Â Â const void *key = svn_apr_hash_index_key(hi);
The new API allows you to extract the key/value with the Proper Type.
Thus, when you use these APIs, I think you should declare them with
the correct type. In this case 'const char *key'.
> + Â Â Â const svn_wc_entry_t *entry = svn_apr_hash_index_val(hi);
> Â Â Â svn_boolean_t hidden;
>
> - Â Â Â apr_hash_this(hi, &key, NULL, &val);
> - Â Â Â entry = val;
> Â Â Â SVN_ERR(svn_wc__entry_is_hidden(&hidden, entry));
> Â Â Â if (!hidden)
> - Â Â Â Â {
> - Â Â Â Â Â apr_hash_set(*entries_pruned, key, APR_HASH_KEY_STRING, entry);
> - Â Â Â Â }
> + Â Â Â Â apr_hash_set(*entries_pruned, key, APR_HASH_KEY_STRING, entry);
Especially given that you're treating it that way here.
>...
> +++ trunk/subversion/libsvn_wc/update_editor.c  Fri Oct  2 12:15:29 2009     (r39770)
> @@ -3351,13 +3351,8 @@ copy_regular_props(apr_hash_t *props_in,
>
> Â for (hi = apr_hash_first(pool, props_in); hi; hi = apr_hash_next(hi))
> Â Â {
> - Â Â Â const void *key;
> - Â Â Â void *val;
> - Â Â Â const char *propname;
> - Â Â Â svn_string_t *propval;
> - Â Â Â apr_hash_this(hi, &key, NULL, &val);
> - Â Â Â propname = key;
> - Â Â Â propval = val;
> + Â Â Â const char *propname = svn_apr_hash_index_key(hi);
> + Â Â Â svn_string_t *propval = svn_apr_hash_index_val(hi);
const!
>...
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404780
Received on 2009-10-08 07:16:54 CEST