List Info

Thread: Re: overload "0+" doesn't handle integer results




Re: overload "0+" doesn't handle integer results
user name
2007-10-07 04:48:51
On 07/10/2007, Rick Delaney <rickbort.ca> wrote:
> The problem here is that the arg passed to int() is
checked if IOK
> (integer) but because it's a reference, it's not.  So
it is treated as a
> float (NV).  And currently it actually calls mynum()
twice for the
> second int() call.  The attached patch fixes that and
should fix your
> problem, although I couldn't test it directly.  I added
tests for the
> call-twice problem, but wasn't sure how to add one for
the 64-bit int
> issue.

Thanks, applied as change #32059, and I confirmed that fixes
the bug
on 64-bit int perl.

Re: overload "0+" doesn't handle integer results
user name
2007-10-07 07:27:26
Rick Delaney wrote:
> The problem here is that the arg passed to int() is
checked if IOK
> (integer) but because it's a reference, it's not.  So
it is treated as a
> float (NV).  And currently it actually calls mynum()
twice for the
> second int() call.  The attached patch fixes that and
should fix your
> problem, although I couldn't test it directly.  I added
tests for the
> call-twice problem, but wasn't sure how to add one for
the 64-bit int
> issue.

Rafael Garcia-Suarez wrote:
> Thanks, applied as change #32059, and I confirmed that
fixes the bug
> on 64-bit int perl.

This is the same bug as reported by me exactly 2 years ago:
    h
ttp://rt.perl.org/rt3/Ticket/Display.html?id=37363
Glad to see it's finally fixed.

Rafael, would you please resolve bug 37363 (or whatever is
appropriate in this case)?  I don't have permission to do
so.  Thanks.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )