On Mon, Feb 19, 2001 at 09:56:37AM +0100, Aldo Calpini wrote:
> investigating further, I've tracked down the problem to this
> line:
>
> BEGIN { eval 'use Filter::cpp' }
>
> the problem seems to be that I *do* have Filter::cpp installed,
> and using this module compromises Tie::VecArray functionality.
How odd. I suspect your C pre-processor is misbehaving. Tell me what
happens if you stick a newline after the ceil() calls in _IDX2BYTES
and _BYTES2IDX.
# Let's not require Filter::cpp.
BEGIN { eval 'use Filter::cpp' }
sub _IDX2BYTES {
my Tie::VecArray $self = shift;
my $idx = shift;
#define _IDX2BYTES($self, $idx) \
ceil($idx * ($self->{bits}/8))
}
sub _BYTES2IDX {
my Tie::VecArray $self = shift;
my $bytes = shift;
#define _BYES2IDX($self, $bytes) \
ceil($bytes * 8 / $self->{bits})
}
--
Michael G Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One