[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [PATCH] Request review for KSharedDataCache (Round 2)
From:       Michael Pyne <mpyne () kde ! org>
Date:       2010-04-30 1:12:42
Message-ID: 201004292112.48579.mpyne () kde ! org
[Download RAW message or body]


On Thursday, April 29, 2010 03:15:24 Oswald Buddenhagen wrote:
> On Wed, Apr 28, 2010 at 09:04:39PM -0400, Michael Pyne wrote:
> > Well it's certainly no difference to the implementation whether it reads
> > 20 bytes and checks the last 1 to determine the version or whether it
> > reads the first byte as the version.
> 
> that's not the point. the idea behind versioning is that you want the
> layout to be changeable. but you can't move around the version field -
> it must always be in the same place. that means that whatever changes
> you make you have to take care that you don't change the offset (and
> size, but that's simple) of the version field. by far the simplest way
> to achieve that is putting it at the start of the struct.
> and obviously the same applies to ready, as it is accessed before the
> version field is even checked.

Well that [changeable layout] isn't what *I* wanted, but I see your point 
given that precondition, and it occurs to me that the one having to touch my 
code afterwards may want to change the layout, so I'll move it around indeed.

Regards,
 - Michael Pyne

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic