diff options
author | Vincent JARDIN <vjardin@free.fr> | 2019-01-02 00:06:29 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-02 11:21:25 +0100 |
commit | 91e44a27f68aa808e03d11b108ae8c8ea3e4c2f9 (patch) | |
tree | 54b70ff0dd4820fb000046ef8714d4107e3311b3 | |
parent | 1732ce9c2357ac5f25f2cc997efb75f673728001 (diff) | |
download | php-git-91e44a27f68aa808e03d11b108ae8c8ea3e4c2f9.tar.gz |
skeleton: support PHP 7.2
skeleton can still be leveraged with older PHP releases, including
PHP 7.2.
I wanted to add this capability since PHP 7.2 is still widely provided
with most Linux distributions.
I am using ext_skel.php on a vanilla Ubuntu 18.04 and Windows
in order to illustrate how to develop a PHP extension for both
OS using the default tools provided by the distributions.
see: https://github.com/vjardin/php-bonjour
-rw-r--r-- | ext/skeleton/skeleton.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c index a93fd57f53..12c8ee4fa9 100644 --- a/ext/skeleton/skeleton.c +++ b/ext/skeleton/skeleton.c @@ -8,6 +8,13 @@ #include "ext/standard/info.h" #include "php_%EXTNAME%.h" +/* For compatibility with older PHP versions */ +#ifndef ZEND_PARSE_PARAMETERS_NONE +#define ZEND_PARSE_PARAMETERS_NONE() \ + ZEND_PARSE_PARAMETERS_START(0, 0) \ + ZEND_PARSE_PARAMETERS_END() +#endif + /* {{{ void %EXTNAME%_test1() */ PHP_FUNCTION(%EXTNAME%_test1) |