From: Craig Duncan Date: Sun, 17 Nov 2019 16:14:09 +0000 (+0000) Subject: Convert the example skeleton extension to use arginfo stubs X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9e8cd2b6b9e24820643b47f427ee10836d944d6;p=php Convert the example skeleton extension to use arginfo stubs --- diff --git a/ext/ext_skel.php b/ext/ext_skel.php index f5cd415ce8..58199f4d8c 100755 --- a/ext/ext_skel.php +++ b/ext/ext_skel.php @@ -330,6 +330,7 @@ function copy_sources() { $files = [ 'skeleton.c' => $options['ext'] . '.c', + 'skeleton.stub' => $options['ext'] . '.stub.php', 'php_skeleton.h' => 'php_' . $options['ext'] . '.h' ]; diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c index 2c03ea9fd5..0bd99f3d41 100644 --- a/ext/skeleton/skeleton.c +++ b/ext/skeleton/skeleton.c @@ -7,6 +7,7 @@ #include "php.h" #include "ext/standard/info.h" #include "php_%EXTNAME%.h" +#include "%EXTNAME%_arginfo.h" /* For compatibility with older PHP versions */ #ifndef ZEND_PARSE_PARAMETERS_NONE @@ -66,16 +67,6 @@ PHP_MINFO_FUNCTION(%EXTNAME%) } /* }}} */ -/* {{{ arginfo - */ -ZEND_BEGIN_ARG_INFO(arginfo_%EXTNAME%_test1, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_%EXTNAME%_test2, 0) - ZEND_ARG_INFO(0, str) -ZEND_END_ARG_INFO() -/* }}} */ - /* {{{ %EXTNAME%_functions[] */ static const zend_function_entry %EXTNAME%_functions[] = { diff --git a/ext/skeleton/skeleton.stub b/ext/skeleton/skeleton.stub new file mode 100644 index 0000000000..4bddcf37aa --- /dev/null +++ b/ext/skeleton/skeleton.stub @@ -0,0 +1,5 @@ +