Skip to content

Remove wrapping comments in ext/skeleton #16894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions ext/ext_skel.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@

/* $Id$ */

/* {{{ error */
function error($message) {
printf('Error: %s%s', $message, PHP_EOL);
exit;
}
/* }}} */

/* {{{ print_help */
function print_help() {
if (PHP_OS_FAMILY != 'Windows') {
$file_prefix = './';
Expand Down Expand Up @@ -114,19 +111,15 @@ functions strictly needed by others. Exposed internal function must be named
HELP;
exit;
}
/* }}} */

/* {{{ task */
function task($label, $callback) {
printf('%s... ', $label);

$callback();

printf('done%s', PHP_EOL);
}
/* }}} */

/* {{{ print_success */
function print_success() {
global $options;

Expand All @@ -148,9 +141,7 @@ function print_success() {
printf('%smake test%2$s%2$s', $make_prefix, PHP_EOL);
printf('Thank you for using PHP!%s', PHP_EOL);
}
/* }}} */

/* {{{ process_args */
function process_args($argv, $argc) {
$options = [
'unix' => true,
Expand Down Expand Up @@ -230,9 +221,7 @@ function process_args($argv, $argc) {

return $options;
}
/* }}} */

/* {{{ process_source_tags */
function process_source_tags($file, $short_name) {
global $options;

Expand Down Expand Up @@ -286,9 +275,7 @@ function process_source_tags($file, $short_name) {
error('Unable to save contents to file: ' . $short_name);
}
}
/* }}} */

/* {{{ copy_config_scripts */
function copy_config_scripts() {
global $options;

Expand All @@ -314,9 +301,7 @@ function copy_config_scripts() {
process_source_tags($new_config_script, $config_script);
}
}
/* }}} */

/* {{{ copy_sources */
function copy_sources() {
global $options;

Expand All @@ -335,9 +320,7 @@ function copy_sources() {
process_source_tags($options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . $dst_file, $dst_file);
}
}
/* }}} */

/* {{{ copy_tests */
function copy_tests() {
global $options;

Expand All @@ -361,8 +344,6 @@ function copy_tests() {
process_source_tags($options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . $new_test, $new_test);
}
}
/* }}} */


if (PHP_SAPI != 'cli') {
error('This script is only suited for CLI');
Expand Down
10 changes: 0 additions & 10 deletions ext/skeleton/skeleton.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@
ZEND_PARSE_PARAMETERS_END()
#endif

/* {{{ void test1() */
PHP_FUNCTION(test1)
{
ZEND_PARSE_PARAMETERS_NONE();

php_printf("The extension %s is loaded and working!\r\n", "%EXTNAME%");
}
/* }}} */

/* {{{ string test2( [ string $var ] ) */
PHP_FUNCTION(test2)
{
char *var = "World";
Expand All @@ -41,9 +38,7 @@ PHP_FUNCTION(test2)

RETURN_STR(retval);
}
/* }}}*/

/* {{{ PHP_RINIT_FUNCTION */
PHP_RINIT_FUNCTION(%EXTNAME%)
{
#if defined(ZTS) && defined(COMPILE_DL_%EXTNAMECAPS%)
Expand All @@ -52,18 +47,14 @@ PHP_RINIT_FUNCTION(%EXTNAME%)

return SUCCESS;
}
/* }}} */

/* {{{ PHP_MINFO_FUNCTION */
PHP_MINFO_FUNCTION(%EXTNAME%)
{
php_info_print_table_start();
php_info_print_table_row(2, "%EXTNAME% support", "enabled");
php_info_print_table_end();
}
/* }}} */

/* {{{ %EXTNAME%_module_entry */
zend_module_entry %EXTNAME%_module_entry = {
STANDARD_MODULE_HEADER,
"%EXTNAME%", /* Extension name */
Expand All @@ -76,7 +67,6 @@ zend_module_entry %EXTNAME%_module_entry = {
PHP_%EXTNAMECAPS%_VERSION, /* Version */
STANDARD_MODULE_PROPERTIES
};
/* }}} */

#ifdef COMPILE_DL_%EXTNAMECAPS%
# ifdef ZTS
Expand Down
Loading