Re: [VOTE][RFC] ZPP Failure on Overflow
| From: | Andrea Faulds | Date: | Wed, 10 Dec 2014 16:04:36 +0000 |
| Subject: | Re: [VOTE][RFC] ZPP Failure on Overflow | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79524@lists.php.net to get a copy of this message | ||
> On 9 Dec 2014, at 15:27, Rowan Collins <rowan.collins@gmail.com> wrote:
>
> Andrea Faulds wrote on 09/12/2014 14:10:
>>> On 9 Dec 2014, at 13:23, Rowan Collins <rowan.collins@gmail.com> wrote:
>>>
>>> Note that in master, the messages have been changed to (correctly) not mention the C
>>> types, only the PHP ones, so it would be more like "expects parameter 1 to be integer, float
>>> (which is beyond integer range) given".
>> They... have? When did this happen? It's something I was very much in favour of and
>> wanted to do myself, but I was unaware this had recently changed. Does that mean I'll have to
>> redo the patch for this RFC? :(
>>
>
> Oh; maybe not. I'm confused now.
>
> There's a commit making the change, I think in amongst the "64-bit" work:
> https://github.com/php/php-src/commit/63ea29a2067ce06e20dda861480d91624389f0f3
>
> But then the current master seems to be back using the old wording (random example):
> https://github.com/php/php-src/blob/master/ext/curl/tests/curl_setopt_error.phpt
> (Also, lxr.php.net doesn't show the PHPT files at all?
> http://lxr.php.net/xref/PHP_TRUNK/ext/curl/tests/)
>
> I actually prepared a PR a while ago to change everything, but master was a bit of a moving
> target at the time, so it probably needs a bit of work to rebase:
> https://github.com/php/php-src/pull/769 I didn't bother because
> I thought someone had beaten me to it, but maybe I should revisit it after all?
Hi!
It looks like those changes aren’t in master. Once this RFC passes, I’d very much like to see a
new attempt to make the names consistent, it’s something that’s bothered me. If this was to be
revisited, I think the names for IS_LONG and IS_BOOL should be “int” and “bool”
respectively, not “integer” and “boolean”, those feel more like proper type names. Also, it
might be worth making is_long an alias of is_int, rather than the reverse which is what we have now.
Thanks!
--
Andrea Faulds
http://ajf.me/