John Peacock wrote:
> Max Bowsher wrote:
>>
>> Read the docstring carefully. You are confusing *keys* and *values*.
>>
>
> I'm just not seeing that:
>
> /**
> * Look up the value associated with a key in a hash table.
> * @param ht The hash table
> * @param key Pointer to the key
> * @param klen Length of the key. Can be APR_HASH_KEY_STRING to use the
> string
> length.
> * @return Returns NULL if the key is not present.
> */
> APR_DECLARE(void *) apr_hash_get(apr_hash_t *ht, const void *key,
> apr_ssize_t klen);
>
> That code (which I inherited from plasma's original patch and didn't
> really
> touch) is looping over the keys of lame_a, then using apr_hash_get() to
> compare the values associated with each key in both hashes.
>
> Granted, the code is suboptimal, since I could be using apr_hash_this() to
> directly retrieve the value from the first hash, but I don't see how I can
> get
> the value associated with that key in the other hash without using
> apr_hash_get().
> I'll go and read through your changed patch after I have breakfast and see
> how
> you did it...
Actually, I meant the svn_subst_keywords_differ docstring.
Your code just wasn't doing what the docstring said it should.
Hopefully my version should explain.
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 22 13:17:04 2005