[PATCH] Request review for KSharedDataCache (Round 2)

Michael Pyne mpyne at kde.org
Fri Apr 30 02:12:42 BST 2010

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.

 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100429/48128e29/attachment.sig>

More information about the kde-core-devel mailing list