On 2023/02/19 11:56, Niels Dossche wrote:
> It's also worth noting that there's a couple of places where there's
> just a check for if (function()) { failure code }. i.e. there is no
> check for == FAILURE, it's just "implied".
Ouch. That's not only fragile, but also very obscure.
(Yadda yadda,
On 2/19/23 11:32, Max Kellermann wrote:
> On 2023/02/19 09:45, Nikita Popov wrote:
>> I expect that there are two main reasons for that:
>> - There are probably some places that return a (non-negative) value or
>> FAILURE.
>> - There are probably some places that check for success/failure using
On 2023/02/19 09:45, Nikita Popov wrote:
> I expect that there are two main reasons for that:
> - There are probably some places that return a (non-negative) value or
> FAILURE.
> - There are probably some places that check for success/failure using >= 0
> and < 0. Another POSIX-ism.
>
> I do
On Sun, Feb 19, 2023, at 09:21, Max Kellermann wrote:
> On 2023/02/19 08:56, Nikita Popov wrote:
> > If you have a function like zend_stream_open_function(), SUCCESS and
> > FAILURE are directly meaningful values.
>
> Agree, but that doesn't explain why FAILURE needs to be negative.
I expect th
On 2023/02/19 08:56, Nikita Popov wrote:
> If you have a function like zend_stream_open_function(), SUCCESS and FAILURE
> are directly meaningful values.
Agree, but that doesn't explain why FAILURE needs to be negative.
> The current guideline for use of bool and zend_result in php-src is that