From kde-core-devel Fri Apr 30 01:12:42 2010 From: Michael Pyne Date: Fri, 30 Apr 2010 01:12:42 +0000 To: kde-core-devel Subject: Re: [PATCH] Request review for KSharedDataCache (Round 2) Message-Id: <201004292112.48579.mpyne () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=127259003102591 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1937923.T42tnATu0Y" --nextPart1937923.T42tnATu0Y Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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. >=20 > 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=20 given that precondition, and it occurs to me that the one having to touch m= y=20 code afterwards may want to change the layout, so I'll move it around indee= d. Regards, - Michael Pyne --nextPart1937923.T42tnATu0Y Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABCAAGBQJL2i6QAAoJEAuvDJx7aunyO/oP/jS1XzbOZphRJCtGYQ7VsFQX Aa6230S6nMl2fq0wNtM7pB8QSqUtowX2wlHgB8Bp9Fuu5TMsC2FA3Xq/gdqxmzvG h3ACfS3D5GH1zfb702mNngVjojV62VIOubUrwyE/PA9CpglAWi3p+jjpx8yKgPqT mEfoEiEk8sEfN7hbRqMYeBs9giUQ3Zu1MVy0L6W1oZYgzKej5/iVqD9NDMy4clIM ghXM6IuKRMLvC3gKGIcOMRkOz+NugbJRFa15+bRZFcEP2vVP8w36Y4ftzbEvrSAE DdfDau0t/b3dvPFWLMAKuOkpAHM4ycoy5pm0HdozHwZpWvlQ7rvsYg3bbpxJp/42 HxdvzxbZVjSJwBvJ4lMUL80K+rAP9QIoJzOiCPO6VbsApWErk5674GtmIoEjqeBw GD3lgyOs3cbhxjilIl7Qty4FBpXAY/cK2jOUsRMknWwyXZb0S7q8YRnjYavnlija s41iFU/bHfjq9RjmIwJc5PuItZen7safsVgZjpV5uXxojyuI+I0lsgeAUws0fHn5 NNm7wlVAqDvMSvHxb5MxSoIVD7ymf3KQPokv93lQr1Gz8fZfwVjq9ykMmnVPG/zy 4uYaeeTKiWhJu2TQeOeiDCl0EVR1T4OcNkU2xWv9AFqgY5PKBkkdZf3v2bM6+NUX HKoXp/KHRaCaidHCBPMl =9/UW -----END PGP SIGNATURE----- --nextPart1937923.T42tnATu0Y--