[rucksack-devel] non-simple-strings and fill-pointers

Pixel B. Interface, III pixel at kepibu.org
Tue Jul 12 06:17:12 UTC 2011


Arthur Lemmens hath declared:
> Pixel B. Interface, III <pixel at kepibu.org> 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.





More information about the rucksack-devel mailing list