Skip to content

Commit bb6e2a1

Browse files
committed
Avoid used of "named fn" in ext/standard
1 parent 7956866 commit bb6e2a1

File tree

13 files changed

+43
-43
lines changed

13 files changed

+43
-43
lines changed

ext/standard/basic_functions.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
146146
PHP_FE(get_html_translation_table, arginfo_get_html_translation_table)
147147
PHP_FE(sha1, arginfo_sha1)
148148
PHP_FE(sha1_file, arginfo_sha1_file)
149-
PHP_NAMED_FE(md5,php_if_md5, arginfo_md5)
150-
PHP_NAMED_FE(md5_file,php_if_md5_file, arginfo_md5_file)
151-
PHP_NAMED_FE(crc32,php_if_crc32, arginfo_crc32)
149+
PHP_FE(md5, arginfo_md5)
150+
PHP_FE(md5_file, arginfo_md5_file)
151+
PHP_FE(crc32, arginfo_crc32)
152152

153153
PHP_FE(iptcparse, arginfo_iptcparse)
154154
PHP_FE(iptcembed, arginfo_iptcembed)
@@ -235,8 +235,8 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
235235
PHP_FE(str_pad, arginfo_str_pad)
236236
PHP_FALIAS(chop, rtrim, arginfo_chop)
237237
PHP_FALIAS(strchr, strstr, arginfo_strchr)
238-
PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), arginfo_sprintf)
239-
PHP_NAMED_FE(printf, PHP_FN(user_printf), arginfo_printf)
238+
PHP_FE(sprintf, arginfo_sprintf)
239+
PHP_FE(printf, arginfo_printf)
240240
PHP_FE(vprintf, arginfo_vprintf)
241241
PHP_FE(vsprintf, arginfo_vsprintf)
242242
PHP_FE(fprintf, arginfo_fprintf)
@@ -361,10 +361,10 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
361361
PHP_FE(fdiv, arginfo_fdiv)
362362
PHP_FE(intdiv, arginfo_intdiv)
363363
#ifdef HAVE_INET_NTOP
364-
PHP_RAW_NAMED_FE(inet_ntop, zif_inet_ntop, arginfo_inet_ntop)
364+
PHP_FE(inet_ntop, arginfo_inet_ntop)
365365
#endif
366366
#ifdef HAVE_INET_PTON
367-
PHP_RAW_NAMED_FE(inet_pton, php_inet_pton, arginfo_inet_pton)
367+
PHP_FE(inet_pton, arginfo_inet_pton)
368368
#endif
369369
PHP_FE(ip2long, arginfo_ip2long)
370370
PHP_FE(long2ip, arginfo_long2ip)
@@ -517,10 +517,10 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
517517
PHP_FE(fgetc, arginfo_fgetc)
518518
PHP_FE(fgets, arginfo_fgets)
519519
PHP_FE(fread, arginfo_fread)
520-
PHP_NAMED_FE(fopen, php_if_fopen, arginfo_fopen)
520+
PHP_FE(fopen, arginfo_fopen)
521521
PHP_FE(fpassthru, arginfo_fpassthru)
522-
PHP_NAMED_FE(ftruncate, php_if_ftruncate, arginfo_ftruncate)
523-
PHP_NAMED_FE(fstat, php_if_fstat, arginfo_fstat)
522+
PHP_FE(ftruncate, arginfo_ftruncate)
523+
PHP_FE(fstat, arginfo_fstat)
524524
PHP_FE(fseek, arginfo_fseek)
525525
PHP_FE(ftell, arginfo_ftell)
526526
PHP_FE(fflush, arginfo_fflush)
@@ -530,7 +530,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
530530
PHP_FE(rename, arginfo_rename)
531531
PHP_FE(copy, arginfo_copy)
532532
PHP_FE(tempnam, arginfo_tempnam)
533-
PHP_NAMED_FE(tmpfile, php_if_tmpfile, arginfo_tmpfile)
533+
PHP_FE(tmpfile, arginfo_tmpfile)
534534
PHP_FE(file, arginfo_file)
535535
PHP_FE(file_get_contents, arginfo_file_get_contents)
536536
PHP_FE(file_put_contents, arginfo_file_put_contents)
@@ -629,7 +629,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
629629

630630
PHP_FE(getcwd, arginfo_getcwd)
631631
PHP_FE(rewinddir, arginfo_rewinddir)
632-
PHP_NAMED_FE(readdir, php_if_readdir, arginfo_readdir)
632+
PHP_FE(readdir, arginfo_readdir)
633633
PHP_FALIAS(dir, getdir, arginfo_dir)
634634
PHP_FE(scandir, arginfo_scandir)
635635
#ifdef HAVE_GLOB
@@ -653,8 +653,8 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
653653
PHP_FE(is_file, arginfo_is_file)
654654
PHP_FE(is_dir, arginfo_is_dir)
655655
PHP_FE(is_link, arginfo_is_link)
656-
PHP_NAMED_FE(stat, php_if_stat, arginfo_stat)
657-
PHP_NAMED_FE(lstat, php_if_lstat, arginfo_lstat)
656+
PHP_FE(stat, arginfo_stat)
657+
PHP_FE(lstat, arginfo_lstat)
658658
PHP_FE(chown, arginfo_chown)
659659
PHP_FE(chgrp, arginfo_chgrp)
660660
#if HAVE_LCHOWN
@@ -1301,7 +1301,7 @@ PHP_FUNCTION(constant)
13011301
#ifdef HAVE_INET_NTOP
13021302
/* {{{ proto string|false inet_ntop(string in_addr)
13031303
Converts a packed inet address to a human readable IP address string */
1304-
PHP_NAMED_FUNCTION(zif_inet_ntop)
1304+
PHP_FUNCTION(inet_ntop)
13051305
{
13061306
char *address;
13071307
size_t address_len;
@@ -1333,7 +1333,7 @@ PHP_NAMED_FUNCTION(zif_inet_ntop)
13331333
#ifdef HAVE_INET_PTON
13341334
/* {{{ proto string|false inet_pton(string ip_address)
13351335
Converts a human readable IP address to a packed binary string */
1336-
PHP_NAMED_FUNCTION(php_inet_pton)
1336+
PHP_FUNCTION(inet_pton)
13371337
{
13381338
int ret, af = AF_INET;
13391339
char *address;

ext/standard/basic_functions.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ PHP_FUNCTION(time_sleep_until);
5252
#endif
5353
PHP_FUNCTION(flush);
5454
#ifdef HAVE_INET_NTOP
55-
PHP_NAMED_FUNCTION(zif_inet_ntop);
55+
PHP_FUNCTION(inet_ntop);
5656
#endif
5757
#ifdef HAVE_INET_PTON
58-
PHP_NAMED_FUNCTION(php_inet_pton);
58+
PHP_FUNCTION(inet_pton);
5959
#endif
6060
PHP_FUNCTION(ip2long);
6161
PHP_FUNCTION(long2ip);
@@ -108,7 +108,7 @@ PHP_FUNCTION(getservbyport);
108108
PHP_FUNCTION(getprotobyname);
109109
PHP_FUNCTION(getprotobynumber);
110110

111-
PHP_NAMED_FUNCTION(php_if_crc32);
111+
PHP_FUNCTION(crc32);
112112

113113
PHP_FUNCTION(register_tick_function);
114114
PHP_FUNCTION(unregister_tick_function);

ext/standard/crc32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static uint32_t crc32_aarch64(uint32_t crc, char *p, size_t nr) {
7070

7171
/* {{{ proto string crc32(string str)
7272
Calculate the crc32 polynomial of a string */
73-
PHP_NAMED_FUNCTION(php_if_crc32)
73+
PHP_FUNCTION(crc32)
7474
{
7575
char *p;
7676
size_t nr;

ext/standard/dir.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static zend_class_entry *dir_class_entry_ptr;
9090
static const zend_function_entry php_dir_class_functions[] = {
9191
PHP_FALIAS(close, closedir, arginfo_class_Directory_close)
9292
PHP_FALIAS(rewind, rewinddir, arginfo_class_Directory_rewind)
93-
PHP_NAMED_FE(read, php_if_readdir, arginfo_class_Directory_read)
93+
PHP_FALIAS(read, readdir, arginfo_class_Directory_read)
9494
PHP_FE_END
9595
};
9696

@@ -385,7 +385,7 @@ PHP_FUNCTION(rewinddir)
385385

386386
/* {{{ proto string|false readdir([resource dir_handle])
387387
Read directory entry from dir_handle */
388-
PHP_NAMED_FUNCTION(php_if_readdir)
388+
PHP_FUNCTION(readdir)
389389
{
390390
zval *id = NULL, *tmp, *myself;
391391
php_stream *dirp;

ext/standard/file.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ PHP_FUNCTION(tempnam)
850850

851851
/* {{{ proto resource tmpfile(void)
852852
Create a temporary file that will be deleted automatically after use */
853-
PHP_NAMED_FUNCTION(php_if_tmpfile)
853+
PHP_FUNCTION(tmpfile)
854854
{
855855
php_stream *stream;
856856

@@ -868,7 +868,7 @@ PHP_NAMED_FUNCTION(php_if_tmpfile)
868868

869869
/* {{{ proto resource fopen(string filename, string mode [, bool use_include_path [, resource context]])
870870
Open a file or a URL and return a file pointer */
871-
PHP_NAMED_FUNCTION(php_if_fopen)
871+
PHP_FUNCTION(fopen)
872872
{
873873
char *filename, *mode;
874874
size_t filename_len, mode_len;
@@ -1483,7 +1483,7 @@ PHP_FUNCTION(unlink)
14831483

14841484
/* {{{ proto bool ftruncate(resource fp, int size)
14851485
Truncate file to 'size' length */
1486-
PHP_NAMED_FUNCTION(php_if_ftruncate)
1486+
PHP_FUNCTION(ftruncate)
14871487
{
14881488
zval *fp;
14891489
zend_long size;
@@ -1512,7 +1512,7 @@ PHP_NAMED_FUNCTION(php_if_ftruncate)
15121512

15131513
/* {{{ proto array fstat(resource fp)
15141514
Stat() on a filehandle */
1515-
PHP_NAMED_FUNCTION(php_if_fstat)
1515+
PHP_FUNCTION(fstat)
15161516
{
15171517
zval *fp;
15181518
zval stat_dev, stat_ino, stat_mode, stat_nlink, stat_uid, stat_gid, stat_rdev,

ext/standard/file.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ PHP_MINIT_FUNCTION(file);
2323
PHP_MSHUTDOWN_FUNCTION(file);
2424

2525
PHP_FUNCTION(tempnam);
26-
PHP_NAMED_FUNCTION(php_if_tmpfile);
27-
PHP_NAMED_FUNCTION(php_if_fopen);
26+
PHP_FUNCTION(tmpfile);
27+
PHP_FUNCTION(fopen);
2828
PHPAPI PHP_FUNCTION(fclose);
2929
PHP_FUNCTION(popen);
3030
PHP_FUNCTION(pclose);
@@ -61,8 +61,8 @@ PHP_FUNCTION(realpath);
6161
#ifdef HAVE_FNMATCH
6262
PHP_FUNCTION(fnmatch);
6363
#endif
64-
PHP_NAMED_FUNCTION(php_if_ftruncate);
65-
PHP_NAMED_FUNCTION(php_if_fstat);
64+
PHP_FUNCTION(ftruncate);
65+
PHP_FUNCTION(fstat);
6666
PHP_FUNCTION(sys_get_temp_dir);
6767

6868
PHP_MINIT_FUNCTION(user_streams);

ext/standard/filestat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,12 +1074,12 @@ FileFunction(PHP_FN(file_exists), FS_EXISTS)
10741074

10751075
/* {{{ proto array lstat(string filename)
10761076
Give information about a file or symbolic link */
1077-
FileFunction(php_if_lstat, FS_LSTAT)
1077+
FileFunction(PHP_FN(lstat), FS_LSTAT)
10781078
/* }}} */
10791079

10801080
/* {{{ proto array stat(string filename)
10811081
Give information about a file */
1082-
FileFunction(php_if_stat, FS_STAT)
1082+
FileFunction(PHP_FN(stat), FS_STAT)
10831083
/* }}} */
10841084

10851085
/* {{{ proto bool realpath_cache_size()

ext/standard/formatted_print.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ php_formatted_print_get_array(zval *array, int *argc)
670670

671671
/* {{{ proto string sprintf(string format [, mixed arg1 [, mixed ...]])
672672
Return a formatted string */
673-
PHP_FUNCTION(user_sprintf)
673+
PHP_FUNCTION(sprintf)
674674
{
675675
zend_string *result;
676676
char *format;
@@ -719,7 +719,7 @@ PHP_FUNCTION(vsprintf)
719719

720720
/* {{{ proto int printf(string format [, mixed arg1 [, mixed ...]])
721721
Output a formatted string */
722-
PHP_FUNCTION(user_printf)
722+
PHP_FUNCTION(printf)
723723
{
724724
zend_string *result;
725725
size_t rlen;

ext/standard/md5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len) /
4040

4141
/* {{{ proto string md5(string str, [ bool raw_output])
4242
Calculate the md5 hash of a string */
43-
PHP_NAMED_FUNCTION(php_if_md5)
43+
PHP_FUNCTION(md5)
4444
{
4545
zend_string *arg;
4646
zend_bool raw_output = 0;
@@ -68,7 +68,7 @@ PHP_NAMED_FUNCTION(php_if_md5)
6868

6969
/* {{{ proto string md5_file(string filename [, bool raw_output])
7070
Calculate the md5 hash of given filename */
71-
PHP_NAMED_FUNCTION(php_if_md5_file)
71+
PHP_FUNCTION(md5_file)
7272
{
7373
char *arg;
7474
size_t arg_len;

ext/standard/md5.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
PHPAPI void make_digest(char *md5str, const unsigned char *digest);
2222
PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len);
2323

24-
PHP_NAMED_FUNCTION(php_if_md5);
25-
PHP_NAMED_FUNCTION(php_if_md5_file);
24+
PHP_FUNCTION(md5);
25+
PHP_FUNCTION(md5_file);
2626

2727
#include "ext/standard/basic_functions.h"
2828

ext/standard/php_dir.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ PHP_FUNCTION(chroot);
2828
#endif
2929
PHP_FUNCTION(getcwd);
3030
PHP_FUNCTION(rewinddir);
31-
PHP_NAMED_FUNCTION(php_if_readdir);
31+
PHP_FUNCTION(readdir);
3232
PHP_FUNCTION(getdir);
3333
PHP_FUNCTION(glob);
3434
PHP_FUNCTION(scandir);

ext/standard/php_filestat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ PHP_FUNCTION(is_file);
3939
PHP_FUNCTION(is_dir);
4040
PHP_FUNCTION(is_link);
4141
PHP_FUNCTION(file_exists);
42-
PHP_NAMED_FUNCTION(php_if_stat);
43-
PHP_NAMED_FUNCTION(php_if_lstat);
42+
PHP_FUNCTION(stat);
43+
PHP_FUNCTION(lstat);
4444
PHP_FUNCTION(disk_total_space);
4545
PHP_FUNCTION(disk_free_space);
4646
PHP_FUNCTION(chown);

ext/standard/php_string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ PHP_FUNCTION(ucwords);
5252
PHP_FUNCTION(strtr);
5353
PHP_FUNCTION(strrev);
5454
PHP_FUNCTION(hebrev);
55-
PHP_FUNCTION(user_sprintf);
56-
PHP_FUNCTION(user_printf);
55+
PHP_FUNCTION(sprintf);
56+
PHP_FUNCTION(printf);
5757
PHP_FUNCTION(vprintf);
5858
PHP_FUNCTION(vsprintf);
5959
PHP_FUNCTION(addcslashes);

0 commit comments

Comments
 (0)