]> granicus.if.org Git - php/commitdiff
Repair ext_skel.php to create the basic framework for a PHP extension
authorZoDream <648383079@qq.com>
Mon, 23 Mar 2020 01:45:34 +0000 (09:45 +0800)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 23 Mar 2020 08:25:06 +0000 (09:25 +0100)
Copy the arginfo stubs file, and drop the %EXTNAME%_ to make things line up.

Closes GH-5289.

ext/ext_skel.php
ext/skeleton/skeleton.c

index 5c6835940fd5d2a157f340295463efa686ba59af..e45671488274c6f1da222042cf2a879743df961d 100755 (executable)
@@ -331,7 +331,8 @@ function copy_sources() {
     $files = [
             'skeleton.c'               => $options['ext'] . '.c',
             'skeleton.stub.php'        => $options['ext'] . '.stub.php',
-            'php_skeleton.h'   => 'php_' . $options['ext'] . '.h'
+            'php_skeleton.h'   => 'php_' . $options['ext'] . '.h',
+            'skeleton_arginfo.h' => $options['ext'] . '_arginfo.h'
             ];
 
     foreach ($files as $src_file => $dst_file) {
index eae396156f2ecaa4eb4c5bb83ce2ed09e4934358..61e9365ea1de1e59c26d06004f8453061e6b624f 100644 (file)
@@ -26,9 +26,9 @@ PHP_FUNCTION(test1)
 }
 /* }}} */
 
-/* {{{ string %EXTNAME%_test2( [ string $var ] )
+/* {{{ string test2( [ string $var ] )
  */
-PHP_FUNCTION(%EXTNAME%_test2)
+PHP_FUNCTION(test2)
 {
        char *var = "World";
        size_t var_len = sizeof("World") - 1;