Hi Matt,

> -----Original Message-----
> From: Matt Wilmas [mailto:php_li...@realplain.com]
> Sent: Wednesday, August 26, 2015 5:22 PM
> To: Anatol Belski <a...@php.net>; php-...@lists.php.net
> Cc: internals@lists.php.net
> Subject: Re: [PHP-CVS] com php-src: fix typo: Zend/zend_range_check.h
> 
> Hi Anatol :-),
> 
> Just wanted to point out that those conditions (non-0 macros, of course)
should
> use UNEXPECTED(), so their code block can be moved "out of the way."
> (May already be happening with a "return" involved.)
> 
> Although now, IF php_error_docref is involved, that *should* implicitly
happen
> since it has been marked with ZEND_COLD.  Still, better to explicitly use
> UNEXPECTED(), which covers all cases...
> 
Tested a bit, but see no diff (maybe not much integrated yet, that's the
reason). But actually those cases will almost imply error checking and a
kind of return. Thus UNEXPECTED is sufficient to be done at one place, so
you've got good point. In case there were a demand for EXPECTED checks,
another set of macros could be added some when.

Regards

Anatol



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to