Re: ZEND_ENGINE_2 define
| From: | Kalle Sommer Nielsen | Date: | Fri, 02 Jan 2015 22:30:00 +0000 |
| Subject: | Re: ZEND_ENGINE_2 define | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80112@lists.php.net to get a copy of this message | ||
2015-01-02 20:41 GMT+01:00 Sara Golemon <php@golemon.com>:
> So instead you have to do:
> #if defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3)
>
#ifdef ZEND_ENGINE_3
# define ZEND_ENGINE_2
#endif
in php_ext.h, like we had the following for 5.2 compatibles:
#if PHP_VERSION_ID < 503000
# define zend_parse_parameters_none()
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")
#endif
Bloilerplate code yes, but that is a small cost for cross version
compatibility. Perhaps its time we have a php_compat.h header that is
up to date for such we have in the main distro for all versions
--
regards,
Kalle Sommer Nielsen
kalle@php.net