Skip to content

Commit 28afaef

Browse files
zx648383079nikic
authored andcommitted
Repair ext_skel.php to create the basic framework for a PHP extension
Copy the arginfo stubs file, and drop the %EXTNAME%_ to make things line up. Closes GH-5289.
1 parent 26b9780 commit 28afaef

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ext/ext_skel.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ function copy_sources() {
331331
$files = [
332332
'skeleton.c' => $options['ext'] . '.c',
333333
'skeleton.stub.php' => $options['ext'] . '.stub.php',
334-
'php_skeleton.h' => 'php_' . $options['ext'] . '.h'
334+
'php_skeleton.h' => 'php_' . $options['ext'] . '.h',
335+
'skeleton_arginfo.h' => $options['ext'] . '_arginfo.h'
335336
];
336337

337338
foreach ($files as $src_file => $dst_file) {

ext/skeleton/skeleton.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ PHP_FUNCTION(test1)
2626
}
2727
/* }}} */
2828

29-
/* {{{ string %EXTNAME%_test2( [ string $var ] )
29+
/* {{{ string test2( [ string $var ] )
3030
*/
31-
PHP_FUNCTION(%EXTNAME%_test2)
31+
PHP_FUNCTION(test2)
3232
{
3333
char *var = "World";
3434
size_t var_len = sizeof("World") - 1;

0 commit comments

Comments
 (0)