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

Re: svn commit: r1396826 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Thu, 11 Oct 2012 17:56:33 -0400

Updated in r1397331.

On Thu, Oct 11, 2012 at 1:09 AM, Ben Reser <ben_at_reser.org> wrote:
> They are indeed. It's always bothered me that we didn't use a stable
> type for our revnums:
>
> $ grep svn_revnum_t subversion/include/svn_types.h | grep typedef
> typedef long int svn_revnum_t;
>
> On Wed, Oct 10, 2012 at 3:31 PM, Greg Stein <gstein_at_gmail.com> wrote:
>> Eh? I thought revnums were longs. Not 64-bit (except by happenstance)
>>
>> On Oct 10, 2012 3:06 PM, <hwright_at_apache.org> wrote:
>>>
>>> Author: hwright
>>> Date: Wed Oct 10 22:05:34 2012
>>> New Revision: 1396826
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1396826&view=rev
>>> Log:
>>> Avoid integer size mismatch warning.
>>>
>>> * subversion/libsvn_fs_fs/tree.c
>>> (cache_entry_t, cache_lookup): Adjust hash_value to match the size of
>>> the
>>> revision number, which is an input to the hash value.
>>>
>>> Modified:
>>> subversion/trunk/subversion/libsvn_fs_fs/tree.c
>>>
>>> Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
>>> URL:
>>> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1396826&r1=1396825&r2=1396826&view=diff
>>>
>>> ==============================================================================
>>> --- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
>>> +++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Wed Oct 10 22:05:34
>>> 2012
>>> @@ -148,7 +148,7 @@ typedef struct cache_entry_t
>>> {
>>> /* hash value derived from PATH, REVISION.
>>> Used to short-circuit failed lookups. */
>>> - apr_uint32_t hash_value;
>>> + apr_uint64_t hash_value;
>>>
>>> /* revision to which the NODE belongs */
>>> svn_revnum_t revision;
>>> @@ -337,7 +337,7 @@ cache_lookup( fs_fs_dag_cache_t *cache
>>> {
>>> apr_size_t i, bucket_index;
>>> apr_size_t path_len = strlen(path);
>>> - apr_uint32_t hash_value = revision;
>>> + apr_uint64_t hash_value = revision;
>>>
>>> /* optimistic lookup: hit the same bucket again? */
>>> cache_entry_t *result = &cache->buckets[cache->last_hit];
>>>
>>>
>>
Received on 2012-10-11 23:57:08 CEST

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.