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

Arthur Lemmens alemmens at xs4all.nl
Mon Jun 20 17:28:10 UTC 2011


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.

Arthur




More information about the rucksack-devel mailing list