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

Re: svn commit: r39997 - trunk/tools/server-side

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

Daniel Shahaf wrote on Tue, 13 Oct 2009 at 22:03 +0200:
> David Glasser wrote on Tue, 13 Oct 2009 at 12:45 -0700:
> > On Oct 13, 2009 12:27 PM, "Daniel Shahaf" <tigris_at_danielsh.fastmail.net>
> > wrote:
> >
> > > +struct key_t
> > > +{
> > > + svn_revnum_t revision;
> > > + apr_off_t offset;
> > > +};
> > > +
> > > +/* What we need to know about a rep. */
> > > +struct value_t
> > > +{
> > > + svn_checksum_t *sha1_checksum;
> > > + apr_uint64_t refcount;
> > > +};
> ...
> > > + apr_hash_set(records, key, sizeof(*key), value);
> >
> > Is it legit to hash on a struct? Couldn't there be padding bytes?

Should I use apr_pcalloc() to allocate the key_t structs?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407310
Received on 2009-10-13 23:48:00 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.