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

Re: FSFS/svn-rep-sharing-stats questions

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 13 Oct 2009 16:04:40 +0200 (Jerusalem Standard Time)

Daniel, thanks for the information. I have already converted the code to
use 'char *' in r39973.

Later I plan switch the hash to (revnum, offset) => (checksum, refcount)
in order to do the counting correctly. As a side effect this will get rid
of the counter-inside-a-pointer tricks.



Daniel Widenfalk wrote on Tue, 13 Oct 2009 at 08:30 +0200:
> David Glasser wrote:
> > <snip>
> >
> > Also, I'm not really sure that casting unsigned int<->void* is
> > technically well-defined.
> Hi all,
> Excuse me for barging in like this but as I've got some
> cross compiler development background I feel like I could
> give you a small nugget of information here.
> The cast is well defined but may not work on 64-bit
> architectures that define int as a 32 bit type (or any arch
> where a (default) pointer is larger than an int). You should
> consider using uintptr_t (or intptr_t), which is defined in
> <stddef.h>, whenever you need to do freaky stuff with pointers.
> Or simply cast to a char * (assuming, of course, that a char
> is 8 bits...).
> Regards
> /Daniel Widenfalk

Received on 2009-10-13 23:47:51 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.