Hehe. Clever trick.
leo
PS nitpick: C89 doesn't allow the declaration of STRING *s after a
statement.
Could one of you explain how this works? I've tried to work it out and it's
not obvious to me.
Nicholas Clark
The C<freeze> vtable appends an INTVAL (the array size) and the the bit
image of the bit array as a STRING to the frozen image. PMC_int_val2 is
the rounded up value of bits allocated. The C<string_from_cstring>
creates just a string header, with the string memory pointing to the bit
image.
NB, if the array was shrinked, the rounded up value of the array size
would be more efficient.
> Nicholas Clark
leo