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

Re: [PATCH] Keywords as hash - final code patch

From: John Peacock <jpeacock_at_rowman.com>
Date: 2005-03-21 23:16:45 CET

Max Bowsher wrote:
> Err, no, I mean the way it gratuitously assumes that just because the
> two hashes have the same number of keys, all those keys must be equal!
>

Umm, isn't that what this block is doing???

+
+ /* If compare_values is FALSE, we can say A and B are the same now. */
+ if (!compare_values)
+ return FALSE;
+
+ /* compare_values is TRUE. Compare value by value */
+ for (hi = apr_hash_first(pool, lame_a);
+ hi && !result;
+ hi = apr_hash_next(hi))
+ {
+ const void *key;
+ apr_hash_this (hi, &key, NULL, NULL);
+ if (!svn_string_compare (apr_hash_get (lame_a, key,
+ APR_HASH_KEY_STRING),
+ apr_hash_get (lame_b, key,
+ APR_HASH_KEY_STRING)))
+ result = TRUE;
+ }
+
+ return result;

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 22 00:36:01 2005

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.