On 11/5/07, Tels <nospam-abuse bloodgate.com> wrote:
> Moin,
>
> On Monday 05 November 2007 19:06:16 Nicholas Clark
wrote:
> > On Sun, Oct 21, 2007 at 09:12:29AM -0400, Jerry D.
Hedden wrote:
> > > Rafael Garcia-Suarez wrote:
> > > > The recent smoke tests show failures on
some configurations with
> > > > -Duselongdoubles or -Dusemorebits for
the new test
> [skip]
> > > Actually, I think they may be indicating a
bug. The tests are
> > > going awry after a 'division by one' test:
> > >
> > > is($oo/1, $ii, '0+ overload with
division');
> > > is($$oo, $cnt++, 'overload called once');
<<== this one
> > > fails
> > >
> > > This indicates that, in this case,
overloading is being called
> > > more than once.
> >
> > I don't think that we document anywhere that
overloading is called
> > exactly once. Unlike magic, I'm not even sure if
it's possible (in
> > the general case) to get it right. With magic,
you're supposed to
> > call SvGETMAGIC() once (per logical operation on
the value) and then
> > look at the results cached via the
SvIVX/SvNVX/SvPVX slots and Sv*OK.
> > [As I understand it]
> >
> > With overloading, you're just supposed to get the
value whenever you
> > need it. [As I understand it].
>
> I am not sure, but in case of:
>
> $a++;
>
> the overload code is supposed to call '++' exactly once
on $a. Not
> twice. Nor shall it call it thrice. Four is right out.
And so on
>
> Or are you saying that while '++' is called only once,
that other,
> not-modifying overload methods like stringification can
be called in
> addition or even multiple times during the increment
operation?
AFAIK, all this was fixed with change #32157.
|