Re: PATCH: bug #46701
| From: | Felipe Pena | Date: | Sat, 03 Jan 2009 13:13:41 +0000 |
| Subject: | Re: PATCH: bug #46701 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42459@lists.php.net to get a copy of this message | ||
Em Sáb, 2009-01-03 às 10:31 -0200, Felipe Pena escreveu:
> Em Sáb, 2009-01-03 às 10:27 -0200, Felipe Pena escreveu:
> > Em Sex, 2009-01-02 às 21:03 -0800, shire escreveu:
> > > I've created a patch for bug #46701 (http://bugs.php.net/bug.php?id=46701) but
> > > it requires Zend changes, it can be found at the links below for all branches. I've verified
> > > all tests pass. We may want to verify it for other architectures due to the nature of it being a
> > > float conversion problem, I tested on Intel OS X 10.5.5. But this should at least be equivalent to
> > > $array[intval($double)] now.
> > >
> > >
> > > http://tekrat.com/patches/bug46701.php6.patch
> > > http://tekrat.com/patches/bug46701.php53.patch
> > > http://tekrat.com/patches/bug46701.php52.patch
> > >
> > >
> >
> > I suppose that should we also change the fetch (ZEND_FETCH_DIM_*)?
> >
> > And probably:
> > case IS_DOUBLE:
> > index = (long)Z_DVAL_P(dim);
> > goto num_index;
> >
> > And zend_execute.c (zend_fetch_dimension_address_inner) will be
> > superfluous with this change.
>
> Errr, I mean, the case IS_DOUBLE stuff in
> zend_fetch_dimension_address_inner will be superfluous.
>
In the end, I see that it requires the macro too, hehe.
So, a little change in your patch:
- case IS_DOUBLE:
- index = (long)Z_DVAL_P(dim);
+ case IS_DOUBLE: {
+ DVAL_TO_LVAL(Z_DVAL_P(dim), index);
goto num_index;
-
+ }
http://felipe.ath.cx/diff/shire-patch-change-46701-5_3.diff
> >
> >
> > > Thanks,
> > > -shire
> > >
--
Regards,
Felipe Pena