From pixel at kepibu.org Tue Jul 12 06:17:12 2011 From: pixel at kepibu.org (Pixel B. Interface, III) Date: Tue, 12 Jul 2011 00:17:12 -0600 Subject: [rucksack-devel] non-simple-strings and fill-pointers References: <026901cc2b46$8dc9a7d0$3100a8c0@trinity> Message-ID: <0fc001cc405b$58649490$3100a8c0@trinity> Arthur Lemmens hath declared: > Pixel B. Interface, III wrote: > >> What I'm getting from Drakma is an adjustable (and hence non-simple) >> string /without/ a fill-pointer. Rucksack, on the other hand, >> assumes non-simple-strings always have fill-pointers. > >> [...] > >> I believe a fairly simple change would allow for fill-pointer-less >> non-simple strings while maintaining the existing format: >> (defmethod serialize ((string string) stream) >> ... >> (unless simple-p >> - (serialize (fill-pointer string) stream) >> + (serialize (and (array-has-fill-pointer-p string) >> + (fill-pointer string)) stream) >> (serialize (adjustable-array-p string) stream)) >> ...) > > Thanks for the report. Your analysis and your proposed solution > look OK to me. I applied your patch and added a little test to > make sure we're not hallucinating. > > This is now in the CVS repository as Rucksack version 0.1.21. I'm a bit tardy in saying this, but: Thanks! :) -- pix Thrilled to see a bug fixed, rather than languish in a database somewhere.