]> granicus.if.org Git - php/commitdiff
Generate functions entries from stubs for another set of extensions
authorMáté Kocsis <kocsismate@woohoolabs.com>
Sat, 4 Apr 2020 21:51:10 +0000 (23:51 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Sat, 4 Apr 2020 22:59:44 +0000 (00:59 +0200)
Closes GH-5351

34 files changed:
ext/filter/filter.c
ext/filter/filter.stub.php
ext/filter/filter_arginfo.h
ext/filter/php_filter.h
ext/ftp/ftp.stub.php
ext/ftp/ftp_arginfo.h
ext/ftp/php_ftp.c
ext/ftp/php_ftp.h
ext/gd/gd.c
ext/gd/gd.stub.php
ext/gd/gd_arginfo.h
ext/gd/php_gd.h
ext/gettext/gettext.c
ext/gettext/gettext.stub.php
ext/gettext/gettext_arginfo.h
ext/gettext/php_gettext.h
ext/gmp/gmp.c
ext/gmp/gmp.stub.php
ext/gmp/gmp_arginfo.h
ext/gmp/php_gmp.h
ext/hash/hash.c
ext/hash/hash.stub.php
ext/hash/hash_arginfo.h
ext/hash/php_hash.h
ext/iconv/iconv.c
ext/iconv/iconv.stub.php
ext/iconv/iconv_arginfo.h
ext/imap/php_imap.c
ext/imap/php_imap.h
ext/imap/php_imap.stub.php
ext/imap/php_imap_arginfo.h
ext/json/json.c
ext/json/json.stub.php
ext/json/json_arginfo.h

index 996308a4181de9f573bb78a2a786445b477682ed..8feae0a3dfa11e9afa34284fc91d461a9a119997 100644 (file)
@@ -78,26 +78,12 @@ static const filter_list_entry filter_list[] = {
 static unsigned int php_sapi_filter(int arg, char *var, char **val, size_t val_len, size_t *new_val_len);
 static unsigned int php_sapi_filter_init(void);
 
-/* {{{ filter_functions[]
- */
-static const zend_function_entry filter_functions[] = {
-       PHP_FE(filter_input,            arginfo_filter_input)
-       PHP_FE(filter_var,              arginfo_filter_var)
-       PHP_FE(filter_input_array,      arginfo_filter_input_array)
-       PHP_FE(filter_var_array,        arginfo_filter_var_array)
-       PHP_FE(filter_list,             arginfo_filter_list)
-       PHP_FE(filter_has_var,          arginfo_filter_has_var)
-       PHP_FE(filter_id,               arginfo_filter_id)
-       PHP_FE_END
-};
-/* }}} */
-
 /* {{{ filter_module_entry
  */
 zend_module_entry filter_module_entry = {
        STANDARD_MODULE_HEADER,
        "filter",
-       filter_functions,
+       ext_functions,
        PHP_MINIT(filter),
        PHP_MSHUTDOWN(filter),
        NULL,
index 31a7f2c3e6166769944050ad818e627eb51cf3a7..5014e60dd95e024024cdb456c0d707ba00c28641 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+/** @generate-function-entries */
+
 function filter_has_var(int $type, string $variable_name): bool {}
 
 /**
index 0c2f590dcea6cbc06521ea1c4930246bc4dd0f5e..b0338ff01e0c67d7ef9076a6ff222ac2afab73b1 100644 (file)
@@ -36,3 +36,24 @@ ZEND_END_ARG_INFO()
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_filter_id, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, filtername, IS_STRING, 0)
 ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(filter_has_var);
+ZEND_FUNCTION(filter_input);
+ZEND_FUNCTION(filter_var);
+ZEND_FUNCTION(filter_input_array);
+ZEND_FUNCTION(filter_var_array);
+ZEND_FUNCTION(filter_list);
+ZEND_FUNCTION(filter_id);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(filter_has_var, arginfo_filter_has_var)
+       ZEND_FE(filter_input, arginfo_filter_input)
+       ZEND_FE(filter_var, arginfo_filter_var)
+       ZEND_FE(filter_input_array, arginfo_filter_input_array)
+       ZEND_FE(filter_var_array, arginfo_filter_var_array)
+       ZEND_FE(filter_list, arginfo_filter_list)
+       ZEND_FE(filter_id, arginfo_filter_id)
+       ZEND_FE_END
+};
index 2a923ab953f96a866b8ddc1c3086620e63ba2418..2798ca22552f2b585a98dfdf9c8a5e4f97b05879 100644 (file)
@@ -42,14 +42,6 @@ PHP_RINIT_FUNCTION(filter);
 PHP_RSHUTDOWN_FUNCTION(filter);
 PHP_MINFO_FUNCTION(filter);
 
-PHP_FUNCTION(filter_input);
-PHP_FUNCTION(filter_var);
-PHP_FUNCTION(filter_input_array);
-PHP_FUNCTION(filter_var_array);
-PHP_FUNCTION(filter_list);
-PHP_FUNCTION(filter_has_var);
-PHP_FUNCTION(filter_id);
-
 ZEND_BEGIN_MODULE_GLOBALS(filter)
        zval post_array;
        zval get_array;
index d3033e3b31049050da548df2e9b8e6cc79d9af26..72b712684390d5769afb61a441ee34ad215cc588 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+/** @generate-function-entries */
+
 /** @return resource|false */
 function ftp_connect(string $host, int $port = 21, int $timeout = 90) {}
 
index 04292b459f2c0ba48ae106be0abb40a39eac31f0..3167de7d644e9cd28e5dd32891ad2e239175c1aa 100644 (file)
@@ -194,3 +194,85 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_get_option, 0, 2, MAY_BE_LON
        ZEND_ARG_INFO(0, ftp)
        ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
 ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(ftp_connect);
+#if defined(HAVE_FTP_SSL)
+ZEND_FUNCTION(ftp_ssl_connect);
+#endif
+ZEND_FUNCTION(ftp_login);
+ZEND_FUNCTION(ftp_pwd);
+ZEND_FUNCTION(ftp_cdup);
+ZEND_FUNCTION(ftp_chdir);
+ZEND_FUNCTION(ftp_exec);
+ZEND_FUNCTION(ftp_raw);
+ZEND_FUNCTION(ftp_mkdir);
+ZEND_FUNCTION(ftp_rmdir);
+ZEND_FUNCTION(ftp_chmod);
+ZEND_FUNCTION(ftp_alloc);
+ZEND_FUNCTION(ftp_nlist);
+ZEND_FUNCTION(ftp_rawlist);
+ZEND_FUNCTION(ftp_mlsd);
+ZEND_FUNCTION(ftp_systype);
+ZEND_FUNCTION(ftp_fget);
+ZEND_FUNCTION(ftp_nb_fget);
+ZEND_FUNCTION(ftp_pasv);
+ZEND_FUNCTION(ftp_get);
+ZEND_FUNCTION(ftp_nb_get);
+ZEND_FUNCTION(ftp_nb_continue);
+ZEND_FUNCTION(ftp_fput);
+ZEND_FUNCTION(ftp_nb_fput);
+ZEND_FUNCTION(ftp_put);
+ZEND_FUNCTION(ftp_append);
+ZEND_FUNCTION(ftp_nb_put);
+ZEND_FUNCTION(ftp_size);
+ZEND_FUNCTION(ftp_mdtm);
+ZEND_FUNCTION(ftp_rename);
+ZEND_FUNCTION(ftp_delete);
+ZEND_FUNCTION(ftp_site);
+ZEND_FUNCTION(ftp_close);
+ZEND_FUNCTION(ftp_set_option);
+ZEND_FUNCTION(ftp_get_option);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(ftp_connect, arginfo_ftp_connect)
+#if defined(HAVE_FTP_SSL)
+       ZEND_FE(ftp_ssl_connect, arginfo_ftp_ssl_connect)
+#endif
+       ZEND_FE(ftp_login, arginfo_ftp_login)
+       ZEND_FE(ftp_pwd, arginfo_ftp_pwd)
+       ZEND_FE(ftp_cdup, arginfo_ftp_cdup)
+       ZEND_FE(ftp_chdir, arginfo_ftp_chdir)
+       ZEND_FE(ftp_exec, arginfo_ftp_exec)
+       ZEND_FE(ftp_raw, arginfo_ftp_raw)
+       ZEND_FE(ftp_mkdir, arginfo_ftp_mkdir)
+       ZEND_FE(ftp_rmdir, arginfo_ftp_rmdir)
+       ZEND_FE(ftp_chmod, arginfo_ftp_chmod)
+       ZEND_FE(ftp_alloc, arginfo_ftp_alloc)
+       ZEND_FE(ftp_nlist, arginfo_ftp_nlist)
+       ZEND_FE(ftp_rawlist, arginfo_ftp_rawlist)
+       ZEND_FE(ftp_mlsd, arginfo_ftp_mlsd)
+       ZEND_FE(ftp_systype, arginfo_ftp_systype)
+       ZEND_FE(ftp_fget, arginfo_ftp_fget)
+       ZEND_FE(ftp_nb_fget, arginfo_ftp_nb_fget)
+       ZEND_FE(ftp_pasv, arginfo_ftp_pasv)
+       ZEND_FE(ftp_get, arginfo_ftp_get)
+       ZEND_FE(ftp_nb_get, arginfo_ftp_nb_get)
+       ZEND_FE(ftp_nb_continue, arginfo_ftp_nb_continue)
+       ZEND_FE(ftp_fput, arginfo_ftp_fput)
+       ZEND_FE(ftp_nb_fput, arginfo_ftp_nb_fput)
+       ZEND_FE(ftp_put, arginfo_ftp_put)
+       ZEND_FE(ftp_append, arginfo_ftp_append)
+       ZEND_FE(ftp_nb_put, arginfo_ftp_nb_put)
+       ZEND_FE(ftp_size, arginfo_ftp_size)
+       ZEND_FE(ftp_mdtm, arginfo_ftp_mdtm)
+       ZEND_FE(ftp_rename, arginfo_ftp_rename)
+       ZEND_FE(ftp_delete, arginfo_ftp_delete)
+       ZEND_FE(ftp_site, arginfo_ftp_site)
+       ZEND_FE(ftp_close, arginfo_ftp_close)
+       ZEND_FALIAS(ftp_quit, ftp_close, arginfo_ftp_quit)
+       ZEND_FE(ftp_set_option, arginfo_ftp_set_option)
+       ZEND_FE(ftp_get_option, arginfo_ftp_get_option)
+       ZEND_FE_END
+};
index 8254ed9127daf637041bb029f18d18cf1bf755b4..f4030038f17f9db7341418a73c15b01191b50dc6 100644 (file)
 static int le_ftpbuf;
 #define le_ftpbuf_name "FTP Buffer"
 
-static const zend_function_entry php_ftp_functions[] = {
-       PHP_FE(ftp_connect,                     arginfo_ftp_connect)
-#ifdef HAVE_FTP_SSL
-       PHP_FE(ftp_ssl_connect,         arginfo_ftp_ssl_connect)
-#endif
-       PHP_FE(ftp_login,                       arginfo_ftp_login)
-       PHP_FE(ftp_pwd,                         arginfo_ftp_pwd)
-       PHP_FE(ftp_cdup,                        arginfo_ftp_cdup)
-       PHP_FE(ftp_chdir,                       arginfo_ftp_chdir)
-       PHP_FE(ftp_exec,                        arginfo_ftp_exec)
-       PHP_FE(ftp_raw,                         arginfo_ftp_raw)
-       PHP_FE(ftp_mkdir,                       arginfo_ftp_mkdir)
-       PHP_FE(ftp_rmdir,                       arginfo_ftp_rmdir)
-       PHP_FE(ftp_chmod,                       arginfo_ftp_chmod)
-       PHP_FE(ftp_alloc,                       arginfo_ftp_alloc)
-       PHP_FE(ftp_nlist,                       arginfo_ftp_nlist)
-       PHP_FE(ftp_rawlist,                     arginfo_ftp_rawlist)
-       PHP_FE(ftp_mlsd,                        arginfo_ftp_mlsd)
-       PHP_FE(ftp_systype,                     arginfo_ftp_systype)
-       PHP_FE(ftp_pasv,                        arginfo_ftp_pasv)
-       PHP_FE(ftp_get,                         arginfo_ftp_get)
-       PHP_FE(ftp_fget,                        arginfo_ftp_fget)
-       PHP_FE(ftp_put,                         arginfo_ftp_put)
-       PHP_FE(ftp_append,                      arginfo_ftp_append)
-       PHP_FE(ftp_fput,                        arginfo_ftp_fput)
-       PHP_FE(ftp_size,                        arginfo_ftp_size)
-       PHP_FE(ftp_mdtm,                        arginfo_ftp_mdtm)
-       PHP_FE(ftp_rename,                      arginfo_ftp_rename)
-       PHP_FE(ftp_delete,                      arginfo_ftp_delete)
-       PHP_FE(ftp_site,                        arginfo_ftp_site)
-       PHP_FE(ftp_close,                       arginfo_ftp_close)
-       PHP_FE(ftp_set_option,          arginfo_ftp_set_option)
-       PHP_FE(ftp_get_option,          arginfo_ftp_get_option)
-       PHP_FE(ftp_nb_fget,                     arginfo_ftp_nb_fget)
-       PHP_FE(ftp_nb_get,                      arginfo_ftp_nb_get)
-       PHP_FE(ftp_nb_continue,         arginfo_ftp_nb_continue)
-       PHP_FE(ftp_nb_put,                      arginfo_ftp_nb_put)
-       PHP_FE(ftp_nb_fput,                     arginfo_ftp_nb_fput)
-       PHP_FALIAS(ftp_quit, ftp_close, arginfo_ftp_quit)
-       PHP_FE_END
-};
-
 zend_module_entry php_ftp_module_entry = {
        STANDARD_MODULE_HEADER_EX,
        NULL,
        NULL,
        "ftp",
-       php_ftp_functions,
+       ext_functions,
        PHP_MINIT(ftp),
        NULL,
        NULL,
index 0d85f648800bc53bff9165f3418469c1b8b3eceb..4d18721284be581ff295b8d0516a38266b22a532 100644 (file)
@@ -34,44 +34,6 @@ extern zend_module_entry php_ftp_module_entry;
 PHP_MINIT_FUNCTION(ftp);
 PHP_MINFO_FUNCTION(ftp);
 
-PHP_FUNCTION(ftp_connect);
-#ifdef HAVE_FTP_SSL
-PHP_FUNCTION(ftp_ssl_connect);
-#endif
-PHP_FUNCTION(ftp_login);
-PHP_FUNCTION(ftp_pwd);
-PHP_FUNCTION(ftp_cdup);
-PHP_FUNCTION(ftp_chdir);
-PHP_FUNCTION(ftp_exec);
-PHP_FUNCTION(ftp_raw);
-PHP_FUNCTION(ftp_mkdir);
-PHP_FUNCTION(ftp_rmdir);
-PHP_FUNCTION(ftp_chmod);
-PHP_FUNCTION(ftp_alloc);
-PHP_FUNCTION(ftp_nlist);
-PHP_FUNCTION(ftp_rawlist);
-PHP_FUNCTION(ftp_mlsd);
-PHP_FUNCTION(ftp_systype);
-PHP_FUNCTION(ftp_pasv);
-PHP_FUNCTION(ftp_get);
-PHP_FUNCTION(ftp_fget);
-PHP_FUNCTION(ftp_put);
-PHP_FUNCTION(ftp_append);
-PHP_FUNCTION(ftp_fput);
-PHP_FUNCTION(ftp_size);
-PHP_FUNCTION(ftp_mdtm);
-PHP_FUNCTION(ftp_rename);
-PHP_FUNCTION(ftp_delete);
-PHP_FUNCTION(ftp_site);
-PHP_FUNCTION(ftp_close);
-PHP_FUNCTION(ftp_set_option);
-PHP_FUNCTION(ftp_get_option);
-PHP_FUNCTION(ftp_nb_get);
-PHP_FUNCTION(ftp_nb_fget);
-PHP_FUNCTION(ftp_nb_put);
-PHP_FUNCTION(ftp_nb_fput);
-PHP_FUNCTION(ftp_nb_continue);
-
 #define phpext_ftp_ptr php_ftp_module_ptr
 
 #else
index 8435d765b6f3a5fcf1fb9e54ac1d9ccb202b13a3..5bb840aad8edf7166b1e534a0120a130972691b9 100644 (file)
@@ -238,160 +238,10 @@ static void php_gd_object_minit_helper()
  *
  ********************************************************/
 
-/* {{{ gd_functions[]
- */
-static const zend_function_entry gd_functions[] = {
-       PHP_FE(gd_info,                                 arginfo_gd_info)
-       PHP_FE(imagearc,                                                                arginfo_imagearc)
-       PHP_FE(imageellipse,                                                    arginfo_imageellipse)
-       PHP_FE(imagechar,                                                               arginfo_imagechar)
-       PHP_FE(imagecharup,                                                             arginfo_imagecharup)
-       PHP_FE(imagecolorat,                                                    arginfo_imagecolorat)
-       PHP_FE(imagecolorallocate,                                              arginfo_imagecolorallocate)
-       PHP_FE(imagepalettecopy,                                                arginfo_imagepalettecopy)
-       PHP_FE(imagecreatefromstring,                                   arginfo_imagecreatefromstring)
-       PHP_FE(imagecolorclosest,                                               arginfo_imagecolorclosest)
-       PHP_FE(imagecolorclosesthwb,                                    arginfo_imagecolorclosesthwb)
-       PHP_FE(imagecolordeallocate,                                    arginfo_imagecolordeallocate)
-       PHP_FE(imagecolorresolve,                                               arginfo_imagecolorresolve)
-       PHP_FE(imagecolorexact,                                                 arginfo_imagecolorexact)
-       PHP_FE(imagecolorset,                                                   arginfo_imagecolorset)
-       PHP_FE(imagecolortransparent,                                   arginfo_imagecolortransparent)
-       PHP_FE(imagecolorstotal,                                                arginfo_imagecolorstotal)
-       PHP_FE(imagecolorsforindex,                                             arginfo_imagecolorsforindex)
-       PHP_FE(imagecopy,                                                               arginfo_imagecopy)
-       PHP_FE(imagecopymerge,                                                  arginfo_imagecopymerge)
-       PHP_FE(imagecopymergegray,                                              arginfo_imagecopymergegray)
-       PHP_FE(imagecopyresized,                                                arginfo_imagecopyresized)
-       PHP_FE(imagecreate,                                                             arginfo_imagecreate)
-       PHP_FE(imagecreatetruecolor,                                    arginfo_imagecreatetruecolor)
-       PHP_FE(imageistruecolor,                                                arginfo_imageistruecolor)
-       PHP_FE(imagetruecolortopalette,                                 arginfo_imagetruecolortopalette)
-       PHP_FE(imagepalettetotruecolor,                                 arginfo_imagepalettetotruecolor)
-       PHP_FE(imagesetthickness,                                               arginfo_imagesetthickness)
-       PHP_FE(imagefilledarc,                                                  arginfo_imagefilledarc)
-       PHP_FE(imagefilledellipse,                                              arginfo_imagefilledellipse)
-       PHP_FE(imagealphablending,                                              arginfo_imagealphablending)
-       PHP_FE(imagesavealpha,                                                  arginfo_imagesavealpha)
-       PHP_FE(imagecolorallocatealpha,                                 arginfo_imagecolorallocatealpha)
-       PHP_FE(imagecolorresolvealpha,                                  arginfo_imagecolorresolvealpha)
-       PHP_FE(imagecolorclosestalpha,                                  arginfo_imagecolorclosestalpha)
-       PHP_FE(imagecolorexactalpha,                                    arginfo_imagecolorexactalpha)
-       PHP_FE(imagecopyresampled,                                              arginfo_imagecopyresampled)
-
-#ifdef PHP_WIN32
-       PHP_FE(imagegrabwindow,                                                 arginfo_imagegrabwindow)
-       PHP_FE(imagegrabscreen,                                                 arginfo_imagegrabscreen)
-#endif
-
-       PHP_FE(imagerotate,                                                             arginfo_imagerotate)
-       PHP_FE(imageflip,                                                               arginfo_imageflip)
-
-       PHP_FE(imageantialias,                                                  arginfo_imageantialias)
-       PHP_FE(imagecrop,                                                               arginfo_imagecrop)
-       PHP_FE(imagecropauto,                                                   arginfo_imagecropauto)
-       PHP_FE(imagescale,                                                              arginfo_imagescale)
-       PHP_FE(imageaffine,                                                             arginfo_imageaffine)
-       PHP_FE(imageaffinematrixconcat,                                 arginfo_imageaffinematrixconcat)
-       PHP_FE(imageaffinematrixget,                                    arginfo_imageaffinematrixget)
-       PHP_FE(imagegetinterpolation,                                   arginfo_imagegetinterpolation)
-       PHP_FE(imagesetinterpolation,                                   arginfo_imagesetinterpolation)
-       PHP_FE(imagesettile,                                                    arginfo_imagesettile)
-       PHP_FE(imagesetbrush,                                                   arginfo_imagesetbrush)
-       PHP_FE(imagesetstyle,                                                   arginfo_imagesetstyle)
-
-#ifdef HAVE_GD_PNG
-       PHP_FE(imagecreatefrompng,                                              arginfo_imagecreatefrompng)
-#endif
-#ifdef HAVE_GD_WEBP
-       PHP_FE(imagecreatefromwebp,                                             arginfo_imagecreatefromwebp)
-#endif
-       PHP_FE(imagecreatefromgif,                                              arginfo_imagecreatefromgif)
-#ifdef HAVE_GD_JPG
-       PHP_FE(imagecreatefromjpeg,                                             arginfo_imagecreatefromjpeg)
-#endif
-       PHP_FE(imagecreatefromwbmp,                                             arginfo_imagecreatefromwbmp)
-       PHP_FE(imagecreatefromxbm,                                              arginfo_imagecreatefromxbm)
-#if defined(HAVE_GD_XPM)
-       PHP_FE(imagecreatefromxpm,                                              arginfo_imagecreatefromxpm)
-#endif
-       PHP_FE(imagecreatefromgd,                                               arginfo_imagecreatefromgd)
-       PHP_FE(imagecreatefromgd2,                                              arginfo_imagecreatefromgd2)
-       PHP_FE(imagecreatefromgd2part,                                  arginfo_imagecreatefromgd2part)
-#ifdef HAVE_GD_BMP
-       PHP_FE(imagecreatefrombmp,                                              arginfo_imagecreatefrombmp)
-#endif
-#ifdef HAVE_GD_TGA
-       PHP_FE(imagecreatefromtga,                                              arginfo_imagecreatefromtga)
-#endif
-#ifdef HAVE_GD_PNG
-       PHP_FE(imagepng,                                                                arginfo_imagepng)
-#endif
-#ifdef HAVE_GD_WEBP
-       PHP_FE(imagewebp,                                                               arginfo_imagewebp)
-#endif
-       PHP_FE(imagegif,                                                                arginfo_imagegif)
-#ifdef HAVE_GD_JPG
-       PHP_FE(imagejpeg,                                                               arginfo_imagejpeg)
-#endif
-       PHP_FE(imagewbmp,                                                               arginfo_imagewbmp)
-       PHP_FE(imagegd,                                                                 arginfo_imagegd)
-       PHP_FE(imagegd2,                                                                arginfo_imagegd2)
-#ifdef HAVE_GD_BMP
-       PHP_FE(imagebmp,                                                                arginfo_imagebmp)
-#endif
-
-       PHP_FE(imagedestroy,                                                    arginfo_imagedestroy)
-       PHP_FE(imagegammacorrect,                                               arginfo_imagegammacorrect)
-       PHP_FE(imagefill,                                                               arginfo_imagefill)
-       PHP_FE(imagefilledpolygon,                                              arginfo_imagefilledpolygon)
-       PHP_FE(imagefilledrectangle,                                    arginfo_imagefilledrectangle)
-       PHP_FE(imagefilltoborder,                                               arginfo_imagefilltoborder)
-       PHP_FE(imagefontwidth,                                                  arginfo_imagefontwidth)
-       PHP_FE(imagefontheight,                                                 arginfo_imagefontheight)
-       PHP_FE(imageinterlace,                                                  arginfo_imageinterlace)
-       PHP_FE(imageline,                                                               arginfo_imageline)
-       PHP_FE(imageloadfont,                                                   arginfo_imageloadfont)
-       PHP_FE(imagepolygon,                                                    arginfo_imagepolygon)
-       PHP_FE(imageopenpolygon,                                                arginfo_imageopenpolygon)
-       PHP_FE(imagerectangle,                                                  arginfo_imagerectangle)
-       PHP_FE(imagesetpixel,                                                   arginfo_imagesetpixel)
-       PHP_FE(imagestring,                                                             arginfo_imagestring)
-       PHP_FE(imagestringup,                                                   arginfo_imagestringup)
-       PHP_FE(imagesx,                                                                 arginfo_imagesx)
-       PHP_FE(imagesy,                                                                 arginfo_imagesy)
-       PHP_FE(imagesetclip,                                                    arginfo_imagesetclip)
-       PHP_FE(imagegetclip,                                                    arginfo_imagegetclip)
-       PHP_FE(imagedashedline,                                                 arginfo_imagedashedline)
-
-#ifdef HAVE_GD_FREETYPE
-       PHP_FE(imagettfbbox,                                                    arginfo_imagettfbbox)
-       PHP_FE(imagettftext,                                                    arginfo_imagettftext)
-       PHP_FE(imageftbbox,                                                             arginfo_imageftbbox)
-       PHP_FE(imagefttext,                                                             arginfo_imagefttext)
-#endif
-
-       PHP_FE(imagetypes,                                                              arginfo_imagetypes)
-
-       PHP_FE(imagelayereffect,                                                arginfo_imagelayereffect)
-       PHP_FE(imagexbm,                                                                arginfo_imagexbm)
-
-       PHP_FE(imagecolormatch,                                                 arginfo_imagecolormatch)
-
-/* gd filters */
-       PHP_FE(imagefilter,                                                             arginfo_imagefilter)
-       PHP_FE(imageconvolution,                                                arginfo_imageconvolution)
-
-       PHP_FE(imageresolution,                                                 arginfo_imageresolution)
-
-       PHP_FE_END
-};
-/* }}} */
-
 zend_module_entry gd_module_entry = {
        STANDARD_MODULE_HEADER,
        "gd",
-       gd_functions,
+       ext_functions,
        PHP_MINIT(gd),
        PHP_MSHUTDOWN(gd),
        NULL,
index 18497cddfe517d189794dc63fa97604deaa33413..1a886f5965d0090a3dd5c437857d991d3f717597 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+/** @generate-function-entries */
+
 function gd_info(): array {}
 
 function imageloadfont(string $filename): int|false {}
index e829e3a4bc70695b40ff925db888e3e5039a1e66..cc2944913e6acf140ed19564869763f66814b174 100644 (file)
@@ -568,3 +568,286 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imageresolution, 0, 1, MAY_BE_AR
        ZEND_ARG_TYPE_INFO(0, res_x, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO(0, res_y, IS_LONG, 0)
 ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(gd_info);
+ZEND_FUNCTION(imageloadfont);
+ZEND_FUNCTION(imagesetstyle);
+ZEND_FUNCTION(imagecreatetruecolor);
+ZEND_FUNCTION(imageistruecolor);
+ZEND_FUNCTION(imagetruecolortopalette);
+ZEND_FUNCTION(imagepalettetotruecolor);
+ZEND_FUNCTION(imagecolormatch);
+ZEND_FUNCTION(imagesetthickness);
+ZEND_FUNCTION(imagefilledellipse);
+ZEND_FUNCTION(imagefilledarc);
+ZEND_FUNCTION(imagealphablending);
+ZEND_FUNCTION(imagesavealpha);
+ZEND_FUNCTION(imagelayereffect);
+ZEND_FUNCTION(imagecolorallocatealpha);
+ZEND_FUNCTION(imagecolorresolvealpha);
+ZEND_FUNCTION(imagecolorclosestalpha);
+ZEND_FUNCTION(imagecolorexactalpha);
+ZEND_FUNCTION(imagecopyresampled);
+#if defined(PHP_WIN32)
+ZEND_FUNCTION(imagegrabwindow);
+#endif
+#if defined(PHP_WIN32)
+ZEND_FUNCTION(imagegrabscreen);
+#endif
+ZEND_FUNCTION(imagerotate);
+ZEND_FUNCTION(imagesettile);
+ZEND_FUNCTION(imagesetbrush);
+ZEND_FUNCTION(imagecreate);
+ZEND_FUNCTION(imagetypes);
+ZEND_FUNCTION(imagecreatefromstring);
+ZEND_FUNCTION(imagecreatefromgif);
+#if defined(HAVE_GD_JPG)
+ZEND_FUNCTION(imagecreatefromjpeg);
+#endif
+#if defined(HAVE_GD_PNG)
+ZEND_FUNCTION(imagecreatefrompng);
+#endif
+#if defined(HAVE_GD_WEBP)
+ZEND_FUNCTION(imagecreatefromwebp);
+#endif
+ZEND_FUNCTION(imagecreatefromxbm);
+#if defined(HAVE_GD_XPM)
+ZEND_FUNCTION(imagecreatefromxpm);
+#endif
+ZEND_FUNCTION(imagecreatefromwbmp);
+ZEND_FUNCTION(imagecreatefromgd);
+ZEND_FUNCTION(imagecreatefromgd2);
+ZEND_FUNCTION(imagecreatefromgd2part);
+#if defined(HAVE_GD_BMP)
+ZEND_FUNCTION(imagecreatefrombmp);
+#endif
+#if defined(HAVE_GD_TGA)
+ZEND_FUNCTION(imagecreatefromtga);
+#endif
+ZEND_FUNCTION(imagexbm);
+ZEND_FUNCTION(imagegif);
+#if defined(HAVE_GD_PNG)
+ZEND_FUNCTION(imagepng);
+#endif
+#if defined(HAVE_GD_WEBP)
+ZEND_FUNCTION(imagewebp);
+#endif
+#if defined(HAVE_GD_JPG)
+ZEND_FUNCTION(imagejpeg);
+#endif
+ZEND_FUNCTION(imagewbmp);
+ZEND_FUNCTION(imagegd);
+ZEND_FUNCTION(imagegd2);
+#if defined(HAVE_GD_BMP)
+ZEND_FUNCTION(imagebmp);
+#endif
+ZEND_FUNCTION(imagedestroy);
+ZEND_FUNCTION(imagecolorallocate);
+ZEND_FUNCTION(imagepalettecopy);
+ZEND_FUNCTION(imagecolorat);
+ZEND_FUNCTION(imagecolorclosest);
+ZEND_FUNCTION(imagecolorclosesthwb);
+ZEND_FUNCTION(imagecolordeallocate);
+ZEND_FUNCTION(imagecolorresolve);
+ZEND_FUNCTION(imagecolorexact);
+ZEND_FUNCTION(imagecolorset);
+ZEND_FUNCTION(imagecolorsforindex);
+ZEND_FUNCTION(imagegammacorrect);
+ZEND_FUNCTION(imagesetpixel);
+ZEND_FUNCTION(imageline);
+ZEND_FUNCTION(imagedashedline);
+ZEND_FUNCTION(imagerectangle);
+ZEND_FUNCTION(imagefilledrectangle);
+ZEND_FUNCTION(imagearc);
+ZEND_FUNCTION(imageellipse);
+ZEND_FUNCTION(imagefilltoborder);
+ZEND_FUNCTION(imagefill);
+ZEND_FUNCTION(imagecolorstotal);
+ZEND_FUNCTION(imagecolortransparent);
+ZEND_FUNCTION(imageinterlace);
+ZEND_FUNCTION(imagepolygon);
+ZEND_FUNCTION(imageopenpolygon);
+ZEND_FUNCTION(imagefilledpolygon);
+ZEND_FUNCTION(imagefontwidth);
+ZEND_FUNCTION(imagefontheight);
+ZEND_FUNCTION(imagechar);
+ZEND_FUNCTION(imagecharup);
+ZEND_FUNCTION(imagestring);
+ZEND_FUNCTION(imagestringup);
+ZEND_FUNCTION(imagecopy);
+ZEND_FUNCTION(imagecopymerge);
+ZEND_FUNCTION(imagecopymergegray);
+ZEND_FUNCTION(imagecopyresized);
+ZEND_FUNCTION(imagesx);
+ZEND_FUNCTION(imagesy);
+ZEND_FUNCTION(imagesetclip);
+ZEND_FUNCTION(imagegetclip);
+#if defined(HAVE_GD_FREETYPE)
+ZEND_FUNCTION(imageftbbox);
+#endif
+#if defined(HAVE_GD_FREETYPE)
+ZEND_FUNCTION(imagefttext);
+#endif
+#if defined(HAVE_GD_FREETYPE)
+ZEND_FUNCTION(imagettfbbox);
+#endif
+#if defined(HAVE_GD_FREETYPE)
+ZEND_FUNCTION(imagettftext);
+#endif
+ZEND_FUNCTION(imagefilter);
+ZEND_FUNCTION(imageconvolution);
+ZEND_FUNCTION(imageflip);
+ZEND_FUNCTION(imageantialias);
+ZEND_FUNCTION(imagecrop);
+ZEND_FUNCTION(imagecropauto);
+ZEND_FUNCTION(imagescale);
+ZEND_FUNCTION(imageaffine);
+ZEND_FUNCTION(imageaffinematrixget);
+ZEND_FUNCTION(imageaffinematrixconcat);
+ZEND_FUNCTION(imagegetinterpolation);
+ZEND_FUNCTION(imagesetinterpolation);
+ZEND_FUNCTION(imageresolution);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(gd_info, arginfo_gd_info)
+       ZEND_FE(imageloadfont, arginfo_imageloadfont)
+       ZEND_FE(imagesetstyle, arginfo_imagesetstyle)
+       ZEND_FE(imagecreatetruecolor, arginfo_imagecreatetruecolor)
+       ZEND_FE(imageistruecolor, arginfo_imageistruecolor)
+       ZEND_FE(imagetruecolortopalette, arginfo_imagetruecolortopalette)
+       ZEND_FE(imagepalettetotruecolor, arginfo_imagepalettetotruecolor)
+       ZEND_FE(imagecolormatch, arginfo_imagecolormatch)
+       ZEND_FE(imagesetthickness, arginfo_imagesetthickness)
+       ZEND_FE(imagefilledellipse, arginfo_imagefilledellipse)
+       ZEND_FE(imagefilledarc, arginfo_imagefilledarc)
+       ZEND_FE(imagealphablending, arginfo_imagealphablending)
+       ZEND_FE(imagesavealpha, arginfo_imagesavealpha)
+       ZEND_FE(imagelayereffect, arginfo_imagelayereffect)
+       ZEND_FE(imagecolorallocatealpha, arginfo_imagecolorallocatealpha)
+       ZEND_FE(imagecolorresolvealpha, arginfo_imagecolorresolvealpha)
+       ZEND_FE(imagecolorclosestalpha, arginfo_imagecolorclosestalpha)
+       ZEND_FE(imagecolorexactalpha, arginfo_imagecolorexactalpha)
+       ZEND_FE(imagecopyresampled, arginfo_imagecopyresampled)
+#if defined(PHP_WIN32)
+       ZEND_FE(imagegrabwindow, arginfo_imagegrabwindow)
+#endif
+#if defined(PHP_WIN32)
+       ZEND_FE(imagegrabscreen, arginfo_imagegrabscreen)
+#endif
+       ZEND_FE(imagerotate, arginfo_imagerotate)
+       ZEND_FE(imagesettile, arginfo_imagesettile)
+       ZEND_FE(imagesetbrush, arginfo_imagesetbrush)
+       ZEND_FE(imagecreate, arginfo_imagecreate)
+       ZEND_FE(imagetypes, arginfo_imagetypes)
+       ZEND_FE(imagecreatefromstring, arginfo_imagecreatefromstring)
+       ZEND_FE(imagecreatefromgif, arginfo_imagecreatefromgif)
+#if defined(HAVE_GD_JPG)
+       ZEND_FE(imagecreatefromjpeg, arginfo_imagecreatefromjpeg)
+#endif
+#if defined(HAVE_GD_PNG)
+       ZEND_FE(imagecreatefrompng, arginfo_imagecreatefrompng)
+#endif
+#if defined(HAVE_GD_WEBP)
+       ZEND_FE(imagecreatefromwebp, arginfo_imagecreatefromwebp)
+#endif
+       ZEND_FE(imagecreatefromxbm, arginfo_imagecreatefromxbm)
+#if defined(HAVE_GD_XPM)
+       ZEND_FE(imagecreatefromxpm, arginfo_imagecreatefromxpm)
+#endif
+       ZEND_FE(imagecreatefromwbmp, arginfo_imagecreatefromwbmp)
+       ZEND_FE(imagecreatefromgd, arginfo_imagecreatefromgd)
+       ZEND_FE(imagecreatefromgd2, arginfo_imagecreatefromgd2)
+       ZEND_FE(imagecreatefromgd2part, arginfo_imagecreatefromgd2part)
+#if defined(HAVE_GD_BMP)
+       ZEND_FE(imagecreatefrombmp, arginfo_imagecreatefrombmp)
+#endif
+#if defined(HAVE_GD_TGA)
+       ZEND_FE(imagecreatefromtga, arginfo_imagecreatefromtga)
+#endif
+       ZEND_FE(imagexbm, arginfo_imagexbm)
+       ZEND_FE(imagegif, arginfo_imagegif)
+#if defined(HAVE_GD_PNG)
+       ZEND_FE(imagepng, arginfo_imagepng)
+#endif
+#if defined(HAVE_GD_WEBP)
+       ZEND_FE(imagewebp, arginfo_imagewebp)
+#endif
+#if defined(HAVE_GD_JPG)
+       ZEND_FE(imagejpeg, arginfo_imagejpeg)
+#endif
+       ZEND_FE(imagewbmp, arginfo_imagewbmp)
+       ZEND_FE(imagegd, arginfo_imagegd)
+       ZEND_FE(imagegd2, arginfo_imagegd2)
+#if defined(HAVE_GD_BMP)
+       ZEND_FE(imagebmp, arginfo_imagebmp)
+#endif
+       ZEND_FE(imagedestroy, arginfo_imagedestroy)
+       ZEND_FE(imagecolorallocate, arginfo_imagecolorallocate)
+       ZEND_FE(imagepalettecopy, arginfo_imagepalettecopy)
+       ZEND_FE(imagecolorat, arginfo_imagecolorat)
+       ZEND_FE(imagecolorclosest, arginfo_imagecolorclosest)
+       ZEND_FE(imagecolorclosesthwb, arginfo_imagecolorclosesthwb)
+       ZEND_FE(imagecolordeallocate, arginfo_imagecolordeallocate)
+       ZEND_FE(imagecolorresolve, arginfo_imagecolorresolve)
+       ZEND_FE(imagecolorexact, arginfo_imagecolorexact)
+       ZEND_FE(imagecolorset, arginfo_imagecolorset)
+       ZEND_FE(imagecolorsforindex, arginfo_imagecolorsforindex)
+       ZEND_FE(imagegammacorrect, arginfo_imagegammacorrect)
+       ZEND_FE(imagesetpixel, arginfo_imagesetpixel)
+       ZEND_FE(imageline, arginfo_imageline)
+       ZEND_FE(imagedashedline, arginfo_imagedashedline)
+       ZEND_FE(imagerectangle, arginfo_imagerectangle)
+       ZEND_FE(imagefilledrectangle, arginfo_imagefilledrectangle)
+       ZEND_FE(imagearc, arginfo_imagearc)
+       ZEND_FE(imageellipse, arginfo_imageellipse)
+       ZEND_FE(imagefilltoborder, arginfo_imagefilltoborder)
+       ZEND_FE(imagefill, arginfo_imagefill)
+       ZEND_FE(imagecolorstotal, arginfo_imagecolorstotal)
+       ZEND_FE(imagecolortransparent, arginfo_imagecolortransparent)
+       ZEND_FE(imageinterlace, arginfo_imageinterlace)
+       ZEND_FE(imagepolygon, arginfo_imagepolygon)
+       ZEND_FE(imageopenpolygon, arginfo_imageopenpolygon)
+       ZEND_FE(imagefilledpolygon, arginfo_imagefilledpolygon)
+       ZEND_FE(imagefontwidth, arginfo_imagefontwidth)
+       ZEND_FE(imagefontheight, arginfo_imagefontheight)
+       ZEND_FE(imagechar, arginfo_imagechar)
+       ZEND_FE(imagecharup, arginfo_imagecharup)
+       ZEND_FE(imagestring, arginfo_imagestring)
+       ZEND_FE(imagestringup, arginfo_imagestringup)
+       ZEND_FE(imagecopy, arginfo_imagecopy)
+       ZEND_FE(imagecopymerge, arginfo_imagecopymerge)
+       ZEND_FE(imagecopymergegray, arginfo_imagecopymergegray)
+       ZEND_FE(imagecopyresized, arginfo_imagecopyresized)
+       ZEND_FE(imagesx, arginfo_imagesx)
+       ZEND_FE(imagesy, arginfo_imagesy)
+       ZEND_FE(imagesetclip, arginfo_imagesetclip)
+       ZEND_FE(imagegetclip, arginfo_imagegetclip)
+#if defined(HAVE_GD_FREETYPE)
+       ZEND_FE(imageftbbox, arginfo_imageftbbox)
+#endif
+#if defined(HAVE_GD_FREETYPE)
+       ZEND_FE(imagefttext, arginfo_imagefttext)
+#endif
+#if defined(HAVE_GD_FREETYPE)
+       ZEND_FE(imagettfbbox, arginfo_imagettfbbox)
+#endif
+#if defined(HAVE_GD_FREETYPE)
+       ZEND_FE(imagettftext, arginfo_imagettftext)
+#endif
+       ZEND_FE(imagefilter, arginfo_imagefilter)
+       ZEND_FE(imageconvolution, arginfo_imageconvolution)
+       ZEND_FE(imageflip, arginfo_imageflip)
+       ZEND_FE(imageantialias, arginfo_imageantialias)
+       ZEND_FE(imagecrop, arginfo_imagecrop)
+       ZEND_FE(imagecropauto, arginfo_imagecropauto)
+       ZEND_FE(imagescale, arginfo_imagescale)
+       ZEND_FE(imageaffine, arginfo_imageaffine)
+       ZEND_FE(imageaffinematrixget, arginfo_imageaffinematrixget)
+       ZEND_FE(imageaffinematrixconcat, arginfo_imageaffinematrixconcat)
+       ZEND_FE(imagegetinterpolation, arginfo_imagegetinterpolation)
+       ZEND_FE(imagesetinterpolation, arginfo_imagesetinterpolation)
+       ZEND_FE(imageresolution, arginfo_imageresolution)
+       ZEND_FE_END
+};
index d429530479ca029eee65a93d341192dd043cfe2a..32fba66165a1a4b53c97245e0f0460866f668ffc 100644 (file)
@@ -77,139 +77,6 @@ PHP_MINIT_FUNCTION(gd);
 PHP_MSHUTDOWN_FUNCTION(gd);
 PHP_RSHUTDOWN_FUNCTION(gd);
 
-PHP_FUNCTION(gd_info);
-PHP_FUNCTION(imagearc);
-PHP_FUNCTION(imageellipse);
-PHP_FUNCTION(imagechar);
-PHP_FUNCTION(imagecharup);
-PHP_FUNCTION(imageistruecolor);
-PHP_FUNCTION(imagecolorallocate);
-PHP_FUNCTION(imagepalettecopy);
-PHP_FUNCTION(imagecolorat);
-PHP_FUNCTION(imagecolorclosest);
-PHP_FUNCTION(imagecolorclosesthwb);
-PHP_FUNCTION(imagecolordeallocate);
-PHP_FUNCTION(imagecolorresolve);
-PHP_FUNCTION(imagecolorexact);
-PHP_FUNCTION(imagecolorset);
-PHP_FUNCTION(imagecolorstotal);
-PHP_FUNCTION(imagecolorsforindex);
-PHP_FUNCTION(imagecolortransparent);
-PHP_FUNCTION(imagecopy);
-PHP_FUNCTION(imagecopymerge);
-PHP_FUNCTION(imagecopyresized);
-PHP_FUNCTION(imagetypes);
-PHP_FUNCTION(imagecreate);
-PHP_FUNCTION(imageftbbox);
-PHP_FUNCTION(imagefttext);
-
-PHP_FUNCTION(imagecreatetruecolor);
-PHP_FUNCTION(imagetruecolortopalette);
-PHP_FUNCTION(imagepalettetotruecolor);
-PHP_FUNCTION(imagesetthickness);
-PHP_FUNCTION(imagefilledellipse);
-PHP_FUNCTION(imagefilledarc);
-PHP_FUNCTION(imagealphablending);
-PHP_FUNCTION(imagesavealpha);
-PHP_FUNCTION(imagecolorallocatealpha);
-PHP_FUNCTION(imagecolorresolvealpha);
-PHP_FUNCTION(imagecolorclosestalpha);
-PHP_FUNCTION(imagecolorexactalpha);
-PHP_FUNCTION(imagecopyresampled);
-
-#ifdef PHP_WIN32
-PHP_FUNCTION(imagegrabwindow);
-PHP_FUNCTION(imagegrabscreen);
-#endif
-
-PHP_FUNCTION(imagerotate);
-
-PHP_FUNCTION(imageflip);
-
-PHP_FUNCTION(imageantialias);
-
-PHP_FUNCTION(imagecrop);
-PHP_FUNCTION(imagecropauto);
-PHP_FUNCTION(imagescale);
-PHP_FUNCTION(imageaffine);
-PHP_FUNCTION(imageaffinematrixget);
-PHP_FUNCTION(imageaffinematrixconcat);
-PHP_FUNCTION(imagegetinterpolation);
-PHP_FUNCTION(imagesetinterpolation);
-
-PHP_FUNCTION(imagesetthickness);
-PHP_FUNCTION(imagecopymergegray);
-PHP_FUNCTION(imagesetbrush);
-PHP_FUNCTION(imagesettile);
-PHP_FUNCTION(imagesetstyle);
-
-PHP_FUNCTION(imagecreatefromstring);
-PHP_FUNCTION(imagecreatefromgif);
-PHP_FUNCTION(imagecreatefromjpeg);
-PHP_FUNCTION(imagecreatefromxbm);
-PHP_FUNCTION(imagecreatefromwebp);
-PHP_FUNCTION(imagecreatefrompng);
-PHP_FUNCTION(imagecreatefromwbmp);
-PHP_FUNCTION(imagecreatefromgd);
-PHP_FUNCTION(imagecreatefromgd2);
-PHP_FUNCTION(imagecreatefromgd2part);
-#if defined(HAVE_GD_BMP)
-PHP_FUNCTION(imagecreatefrombmp);
-#endif
-#if defined(HAVE_GD_TGA)
-PHP_FUNCTION(imagecreatefromtga);
-#endif
-#if defined(HAVE_GD_XPM)
-PHP_FUNCTION(imagecreatefromxpm);
-#endif
-
-PHP_FUNCTION(imagegammacorrect);
-PHP_FUNCTION(imagedestroy);
-PHP_FUNCTION(imagefill);
-PHP_FUNCTION(imagefilledpolygon);
-PHP_FUNCTION(imagefilledrectangle);
-PHP_FUNCTION(imagefilltoborder);
-PHP_FUNCTION(imagefontwidth);
-PHP_FUNCTION(imagefontheight);
-
-PHP_FUNCTION(imagegif );
-PHP_FUNCTION(imagejpeg );
-PHP_FUNCTION(imagepng);
-PHP_FUNCTION(imagewebp);
-PHP_FUNCTION(imagewbmp);
-PHP_FUNCTION(imagegd);
-PHP_FUNCTION(imagegd2);
-#if defined(HAVE_GD_BMP)
-PHP_FUNCTION(imagebmp);
-#endif
-
-PHP_FUNCTION(imageinterlace);
-PHP_FUNCTION(imageline);
-PHP_FUNCTION(imageloadfont);
-PHP_FUNCTION(imagepolygon);
-PHP_FUNCTION(imageopenpolygon);
-PHP_FUNCTION(imagerectangle);
-PHP_FUNCTION(imagesetpixel);
-PHP_FUNCTION(imagestring);
-PHP_FUNCTION(imagestringup);
-PHP_FUNCTION(imagesx);
-PHP_FUNCTION(imagesy);
-PHP_FUNCTION(imagesetclip);
-PHP_FUNCTION(imagegetclip);
-PHP_FUNCTION(imagedashedline);
-PHP_FUNCTION(imagettfbbox);
-PHP_FUNCTION(imagettftext);
-
-PHP_FUNCTION(imagecolormatch);
-
-PHP_FUNCTION(imagelayereffect);
-PHP_FUNCTION(imagexbm);
-
-PHP_FUNCTION(imagefilter);
-PHP_FUNCTION(imageconvolution);
-
-PHP_FUNCTION(imageresolution);
-
 PHP_GD_API int phpi_get_le_gd(void);
 
 #else
index ab796630f4a019836f74c6d676882e05f1bca3f9..7e6b95f5fca58db111e0546e81575d615e23c6d2 100644 (file)
 #include "php_gettext.h"
 #include "gettext_arginfo.h"
 
-/* {{{ php_gettext_functions[]
- */
-static const zend_function_entry php_gettext_functions[] = {
-       PHP_NAMED_FE(textdomain,                zif_textdomain,         arginfo_textdomain)
-       PHP_NAMED_FE(gettext,                   zif_gettext,            arginfo_gettext)
-       /* Alias for gettext() */
-       PHP_NAMED_FE(_,                                 zif_gettext,            arginfo_gettext)
-       PHP_NAMED_FE(dgettext,                  zif_dgettext,           arginfo_dgettext)
-       PHP_NAMED_FE(dcgettext,                 zif_dcgettext,          arginfo_dcgettext)
-       PHP_NAMED_FE(bindtextdomain,    zif_bindtextdomain,     arginfo_bindtextdomain)
-#if HAVE_NGETTEXT
-       PHP_NAMED_FE(ngettext,                  zif_ngettext,           arginfo_ngettext)
-#endif
-#if HAVE_DNGETTEXT
-       PHP_NAMED_FE(dngettext,                 zif_dngettext,          arginfo_dngettext)
-#endif
-#if HAVE_DCNGETTEXT
-       PHP_NAMED_FE(dcngettext,                zif_dcngettext,         arginfo_dcngettext)
-#endif
-#if HAVE_BIND_TEXTDOMAIN_CODESET
-       PHP_NAMED_FE(bind_textdomain_codeset,   zif_bind_textdomain_codeset,    arginfo_bind_textdomain_codeset)
-#endif
-    PHP_FE_END
-};
-/* }}} */
-
 #include <libintl.h>
 
 zend_module_entry php_gettext_module_entry = {
        STANDARD_MODULE_HEADER,
        "gettext",
-       php_gettext_functions,
+       ext_functions,
        NULL,
        NULL,
        NULL,
@@ -96,7 +70,7 @@ PHP_MINFO_FUNCTION(php_gettext)
 
 /* {{{ proto string textdomain(string domain)
    Set the textdomain to "domain". Returns the current domain */
-PHP_NAMED_FUNCTION(zif_textdomain)
+PHP_FUNCTION(textdomain)
 {
        char *domain = NULL, *domain_name, *retval;
        size_t domain_len = 0;
@@ -121,7 +95,7 @@ PHP_NAMED_FUNCTION(zif_textdomain)
 
 /* {{{ proto string gettext(string msgid)
    Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist */
-PHP_NAMED_FUNCTION(zif_gettext)
+PHP_FUNCTION(gettext)
 {
        char *msgstr;
        zend_string *msgid;
@@ -143,7 +117,7 @@ PHP_NAMED_FUNCTION(zif_gettext)
 
 /* {{{ proto string dgettext(string domain_name, string msgid)
    Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist */
-PHP_NAMED_FUNCTION(zif_dgettext)
+PHP_FUNCTION(dgettext)
 {
        char *msgstr;
        zend_string *domain, *msgid;
@@ -167,7 +141,7 @@ PHP_NAMED_FUNCTION(zif_dgettext)
 
 /* {{{ proto string dcgettext(string domain_name, string msgid, int category)
    Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist */
-PHP_NAMED_FUNCTION(zif_dcgettext)
+PHP_FUNCTION(dcgettext)
 {
        char *msgstr;
        zend_string *domain, *msgid;
@@ -192,7 +166,7 @@ PHP_NAMED_FUNCTION(zif_dcgettext)
 
 /* {{{ proto string bindtextdomain(string domain_name, string dir)
    Bind to the text domain domain_name, looking for translations in dir. Returns the current domain */
-PHP_NAMED_FUNCTION(zif_bindtextdomain)
+PHP_FUNCTION(bindtextdomain)
 {
        char *domain, *dir;
        size_t domain_len, dir_len;
@@ -226,7 +200,7 @@ PHP_NAMED_FUNCTION(zif_bindtextdomain)
 #if HAVE_NGETTEXT
 /* {{{ proto string ngettext(string MSGID1, string MSGID2, int N)
    Plural version of gettext() */
-PHP_NAMED_FUNCTION(zif_ngettext)
+PHP_FUNCTION(ngettext)
 {
        char *msgid1, *msgid2, *msgstr;
        size_t msgid1_len, msgid2_len;
@@ -250,7 +224,7 @@ PHP_NAMED_FUNCTION(zif_ngettext)
 #if HAVE_DNGETTEXT
 /* {{{ proto string dngettext(string domain, string msgid1, string msgid2, int count)
    Plural version of dgettext() */
-PHP_NAMED_FUNCTION(zif_dngettext)
+PHP_FUNCTION(dngettext)
 {
        char *domain, *msgid1, *msgid2, *msgstr = NULL;
        size_t domain_len, msgid1_len, msgid2_len;
@@ -276,7 +250,7 @@ PHP_NAMED_FUNCTION(zif_dngettext)
 #if HAVE_DCNGETTEXT
 /* {{{ proto string dcngettext(string domain, string msgid1, string msgid2, int n, int category)
    Plural version of dcgettext() */
-PHP_NAMED_FUNCTION(zif_dcngettext)
+PHP_FUNCTION(dcngettext)
 {
        char *domain, *msgid1, *msgid2, *msgstr = NULL;
        size_t domain_len, msgid1_len, msgid2_len;
@@ -305,7 +279,7 @@ PHP_NAMED_FUNCTION(zif_dcngettext)
 
 /* {{{ proto string bind_textdomain_codeset(string domain, string codeset)
    Specify the character encoding in which the messages from the DOMAIN message catalog will be returned. */
-PHP_NAMED_FUNCTION(zif_bind_textdomain_codeset)
+PHP_FUNCTION(bind_textdomain_codeset)
 {
        char *domain, *codeset, *retval = NULL;
        size_t domain_len, codeset_len;
index 16315f0033051f9ac135610d8f94bff25649c373..71c7712001cfb961c3c237b448f940d1f7015bad 100644 (file)
@@ -1,9 +1,14 @@
 <?php
 
+/** @generate-function-entries */
+
 function textdomain(?string $domain): string|false {}
 
 function gettext(string $msgid): string|false {}
 
+/** @alias gettext */
+function _(string $msgid): string|false {}
+
 function dgettext(string $domain_name, string $msgid): string|false {}
 
 function dcgettext(string $domain_name, string $msgid, int $category): string|false {}
index d3c4374b4a6230be777231c6d22fe31feab8ae88..03933da2f6389e021d02308d1d70cc37d6c8a92b 100644 (file)
@@ -8,6 +8,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gettext, 0, 1, MAY_BE_STRING|MAY
        ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
+#define arginfo__ arginfo_gettext
+
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dgettext, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, domain_name, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0)
@@ -57,3 +59,45 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bind_textdomain_codeset, 0, 2, M
        ZEND_ARG_TYPE_INFO(0, codeset, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 #endif
+
+
+ZEND_FUNCTION(textdomain);
+ZEND_FUNCTION(gettext);
+ZEND_FUNCTION(dgettext);
+ZEND_FUNCTION(dcgettext);
+ZEND_FUNCTION(bindtextdomain);
+#if HAVE_NGETTEXT
+ZEND_FUNCTION(ngettext);
+#endif
+#if HAVE_DNGETTEXT
+ZEND_FUNCTION(dngettext);
+#endif
+#if HAVE_DCNGETTEXT
+ZEND_FUNCTION(dcngettext);
+#endif
+#if HAVE_BIND_TEXTDOMAIN_CODESET
+ZEND_FUNCTION(bind_textdomain_codeset);
+#endif
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(textdomain, arginfo_textdomain)
+       ZEND_FE(gettext, arginfo_gettext)
+       ZEND_FALIAS(_, gettext, arginfo__)
+       ZEND_FE(dgettext, arginfo_dgettext)
+       ZEND_FE(dcgettext, arginfo_dcgettext)
+       ZEND_FE(bindtextdomain, arginfo_bindtextdomain)
+#if HAVE_NGETTEXT
+       ZEND_FE(ngettext, arginfo_ngettext)
+#endif
+#if HAVE_DNGETTEXT
+       ZEND_FE(dngettext, arginfo_dngettext)
+#endif
+#if HAVE_DCNGETTEXT
+       ZEND_FE(dcngettext, arginfo_dcngettext)
+#endif
+#if HAVE_BIND_TEXTDOMAIN_CODESET
+       ZEND_FE(bind_textdomain_codeset, arginfo_bind_textdomain_codeset)
+#endif
+       ZEND_FE_END
+};
index e008a61b8cb5bbe41a8592a87240da01b0be0996..647d8bffa68df5bda57f922b0b280524dbc61afa 100644 (file)
@@ -27,24 +27,6 @@ extern zend_module_entry php_gettext_module_entry;
 
 PHP_MINFO_FUNCTION(php_gettext);
 
-PHP_NAMED_FUNCTION(zif_textdomain);
-PHP_NAMED_FUNCTION(zif_gettext);
-PHP_NAMED_FUNCTION(zif_dgettext);
-PHP_NAMED_FUNCTION(zif_dcgettext);
-PHP_NAMED_FUNCTION(zif_bindtextdomain);
-#if HAVE_NGETTEXT
-PHP_NAMED_FUNCTION(zif_ngettext);
-#endif
-#if HAVE_DNGETTEXT
-PHP_NAMED_FUNCTION(zif_dngettext);
-#endif
-#if HAVE_DCNGETTEXT
-PHP_NAMED_FUNCTION(zif_dcngettext);
-#endif
-#if HAVE_BIND_TEXTDOMAIN_CODESET
-PHP_NAMED_FUNCTION(zif_bind_textdomain_codeset);
-#endif
-
 #else
 #define gettext_module_ptr NULL
 #endif /* HAVE_LIBINTL */
index b0682c11f230f1818a7722287db4cfe8701ddc64..a714b0760f13e435214fb72b35a933400153f965 100644 (file)
 ZEND_DECLARE_MODULE_GLOBALS(gmp)
 static ZEND_GINIT_FUNCTION(gmp);
 
-/* {{{ gmp_functions[]
- */
-static const zend_function_entry gmp_functions[] = {
-       ZEND_FE(gmp_init,               arginfo_gmp_init)
-       ZEND_FE(gmp_import,             arginfo_gmp_import)
-       ZEND_FE(gmp_export,             arginfo_gmp_export)
-       ZEND_FE(gmp_intval,             arginfo_gmp_intval)
-       ZEND_FE(gmp_strval,             arginfo_gmp_strval)
-       ZEND_FE(gmp_add,                arginfo_gmp_add)
-       ZEND_FE(gmp_sub,                arginfo_gmp_sub)
-       ZEND_FE(gmp_mul,                arginfo_gmp_mul)
-       ZEND_FE(gmp_div_qr,             arginfo_gmp_div_qr)
-       ZEND_FE(gmp_div_q,              arginfo_gmp_div_q)
-       ZEND_FE(gmp_div_r,              arginfo_gmp_div_r)
-       ZEND_FALIAS(gmp_div, gmp_div_q, arginfo_gmp_div)
-       ZEND_FE(gmp_mod,                arginfo_gmp_mod)
-       ZEND_FE(gmp_divexact,   arginfo_gmp_divexact)
-       ZEND_FE(gmp_neg,                arginfo_gmp_neg)
-       ZEND_FE(gmp_abs,                arginfo_gmp_abs)
-       ZEND_FE(gmp_fact,               arginfo_gmp_fact)
-       ZEND_FE(gmp_sqrt,               arginfo_gmp_sqrt)
-       ZEND_FE(gmp_sqrtrem,    arginfo_gmp_sqrtrem)
-       ZEND_FE(gmp_root,               arginfo_gmp_root)
-       ZEND_FE(gmp_rootrem,    arginfo_gmp_rootrem)
-       ZEND_FE(gmp_pow,                arginfo_gmp_pow)
-       ZEND_FE(gmp_powm,               arginfo_gmp_powm)
-       ZEND_FE(gmp_perfect_square,     arginfo_gmp_perfect_square)
-       ZEND_FE(gmp_perfect_power,      arginfo_gmp_perfect_power)
-       ZEND_FE(gmp_prob_prime, arginfo_gmp_prob_prime)
-       ZEND_FE(gmp_gcd,                arginfo_gmp_gcd)
-       ZEND_FE(gmp_gcdext,             arginfo_gmp_gcdext)
-       ZEND_FE(gmp_lcm,                arginfo_gmp_lcm)
-       ZEND_FE(gmp_invert,             arginfo_gmp_invert)
-       ZEND_FE(gmp_jacobi,             arginfo_gmp_jacobi)
-       ZEND_FE(gmp_legendre,   arginfo_gmp_legendre)
-       ZEND_FE(gmp_kronecker,  arginfo_gmp_kronecker)
-       ZEND_FE(gmp_cmp,                arginfo_gmp_cmp)
-       ZEND_FE(gmp_sign,               arginfo_gmp_sign)
-       ZEND_FE(gmp_random_seed,        arginfo_gmp_random_seed)
-       ZEND_FE(gmp_random_bits,  arginfo_gmp_random_bits)
-       ZEND_FE(gmp_random_range, arginfo_gmp_random_range)
-       ZEND_FE(gmp_and,                arginfo_gmp_and)
-       ZEND_FE(gmp_or,                 arginfo_gmp_or)
-       ZEND_FE(gmp_com,                arginfo_gmp_com)
-       ZEND_FE(gmp_xor,                arginfo_gmp_xor)
-       ZEND_FE(gmp_setbit,             arginfo_gmp_setbit)
-       ZEND_FE(gmp_clrbit,             arginfo_gmp_clrbit)
-       ZEND_FE(gmp_testbit,    arginfo_gmp_testbit)
-       ZEND_FE(gmp_scan0,      arginfo_gmp_scan0)
-       ZEND_FE(gmp_scan1,      arginfo_gmp_scan1)
-       ZEND_FE(gmp_popcount,   arginfo_gmp_popcount)
-       ZEND_FE(gmp_hamdist,    arginfo_gmp_hamdist)
-       ZEND_FE(gmp_nextprime,  arginfo_gmp_nextprime)
-       ZEND_FE(gmp_binomial,   arginfo_gmp_binomial)
-       PHP_FE_END
-};
-/* }}} */
-
 /* {{{ gmp_module_entry
  */
 zend_module_entry gmp_module_entry = {
        STANDARD_MODULE_HEADER,
        "gmp",
-       gmp_functions,
+       ext_functions,
        ZEND_MODULE_STARTUP_N(gmp),
        NULL,
        NULL,
index ab86ce944b14ecf189d5937a67df690e628cb51c..a95616aa4eaf8f12223c3379ee3695962b3b74ea 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+/** @generate-function-entries */
+
 /** @param int|bool|string $number */
 function gmp_init($number, int $base = 0): GMP|false {}
 
index 714bd046e26a94399ef1cd0ad72ad673d579d2d4..91664b87102daa68090f2e69230f8ead67ac9433 100644 (file)
@@ -181,3 +181,111 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_gmp_binomial, 0, 2, GMP, MAY
        ZEND_ARG_INFO(0, a)
        ZEND_ARG_TYPE_INFO(0, b, IS_LONG, 0)
 ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(gmp_init);
+ZEND_FUNCTION(gmp_import);
+ZEND_FUNCTION(gmp_export);
+ZEND_FUNCTION(gmp_intval);
+ZEND_FUNCTION(gmp_strval);
+ZEND_FUNCTION(gmp_add);
+ZEND_FUNCTION(gmp_sub);
+ZEND_FUNCTION(gmp_mul);
+ZEND_FUNCTION(gmp_div_qr);
+ZEND_FUNCTION(gmp_div_q);
+ZEND_FUNCTION(gmp_div_r);
+ZEND_FUNCTION(gmp_mod);
+ZEND_FUNCTION(gmp_divexact);
+ZEND_FUNCTION(gmp_neg);
+ZEND_FUNCTION(gmp_abs);
+ZEND_FUNCTION(gmp_fact);
+ZEND_FUNCTION(gmp_sqrt);
+ZEND_FUNCTION(gmp_sqrtrem);
+ZEND_FUNCTION(gmp_root);
+ZEND_FUNCTION(gmp_rootrem);
+ZEND_FUNCTION(gmp_pow);
+ZEND_FUNCTION(gmp_powm);
+ZEND_FUNCTION(gmp_perfect_square);
+ZEND_FUNCTION(gmp_perfect_power);
+ZEND_FUNCTION(gmp_prob_prime);
+ZEND_FUNCTION(gmp_gcd);
+ZEND_FUNCTION(gmp_gcdext);
+ZEND_FUNCTION(gmp_lcm);
+ZEND_FUNCTION(gmp_invert);
+ZEND_FUNCTION(gmp_jacobi);
+ZEND_FUNCTION(gmp_legendre);
+ZEND_FUNCTION(gmp_kronecker);
+ZEND_FUNCTION(gmp_cmp);
+ZEND_FUNCTION(gmp_sign);
+ZEND_FUNCTION(gmp_random_seed);
+ZEND_FUNCTION(gmp_random_bits);
+ZEND_FUNCTION(gmp_random_range);
+ZEND_FUNCTION(gmp_and);
+ZEND_FUNCTION(gmp_or);
+ZEND_FUNCTION(gmp_com);
+ZEND_FUNCTION(gmp_xor);
+ZEND_FUNCTION(gmp_setbit);
+ZEND_FUNCTION(gmp_clrbit);
+ZEND_FUNCTION(gmp_testbit);
+ZEND_FUNCTION(gmp_scan0);
+ZEND_FUNCTION(gmp_scan1);
+ZEND_FUNCTION(gmp_popcount);
+ZEND_FUNCTION(gmp_hamdist);
+ZEND_FUNCTION(gmp_nextprime);
+ZEND_FUNCTION(gmp_binomial);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(gmp_init, arginfo_gmp_init)
+       ZEND_FE(gmp_import, arginfo_gmp_import)
+       ZEND_FE(gmp_export, arginfo_gmp_export)
+       ZEND_FE(gmp_intval, arginfo_gmp_intval)
+       ZEND_FE(gmp_strval, arginfo_gmp_strval)
+       ZEND_FE(gmp_add, arginfo_gmp_add)
+       ZEND_FE(gmp_sub, arginfo_gmp_sub)
+       ZEND_FE(gmp_mul, arginfo_gmp_mul)
+       ZEND_FE(gmp_div_qr, arginfo_gmp_div_qr)
+       ZEND_FE(gmp_div_q, arginfo_gmp_div_q)
+       ZEND_FE(gmp_div_r, arginfo_gmp_div_r)
+       ZEND_FALIAS(gmp_div, gmp_div_q, arginfo_gmp_div)
+       ZEND_FE(gmp_mod, arginfo_gmp_mod)
+       ZEND_FE(gmp_divexact, arginfo_gmp_divexact)
+       ZEND_FE(gmp_neg, arginfo_gmp_neg)
+       ZEND_FE(gmp_abs, arginfo_gmp_abs)
+       ZEND_FE(gmp_fact, arginfo_gmp_fact)
+       ZEND_FE(gmp_sqrt, arginfo_gmp_sqrt)
+       ZEND_FE(gmp_sqrtrem, arginfo_gmp_sqrtrem)
+       ZEND_FE(gmp_root, arginfo_gmp_root)
+       ZEND_FE(gmp_rootrem, arginfo_gmp_rootrem)
+       ZEND_FE(gmp_pow, arginfo_gmp_pow)
+       ZEND_FE(gmp_powm, arginfo_gmp_powm)
+       ZEND_FE(gmp_perfect_square, arginfo_gmp_perfect_square)
+       ZEND_FE(gmp_perfect_power, arginfo_gmp_perfect_power)
+       ZEND_FE(gmp_prob_prime, arginfo_gmp_prob_prime)
+       ZEND_FE(gmp_gcd, arginfo_gmp_gcd)
+       ZEND_FE(gmp_gcdext, arginfo_gmp_gcdext)
+       ZEND_FE(gmp_lcm, arginfo_gmp_lcm)
+       ZEND_FE(gmp_invert, arginfo_gmp_invert)
+       ZEND_FE(gmp_jacobi, arginfo_gmp_jacobi)
+       ZEND_FE(gmp_legendre, arginfo_gmp_legendre)
+       ZEND_FE(gmp_kronecker, arginfo_gmp_kronecker)
+       ZEND_FE(gmp_cmp, arginfo_gmp_cmp)
+       ZEND_FE(gmp_sign, arginfo_gmp_sign)
+       ZEND_FE(gmp_random_seed, arginfo_gmp_random_seed)
+       ZEND_FE(gmp_random_bits, arginfo_gmp_random_bits)
+       ZEND_FE(gmp_random_range, arginfo_gmp_random_range)
+       ZEND_FE(gmp_and, arginfo_gmp_and)
+       ZEND_FE(gmp_or, arginfo_gmp_or)
+       ZEND_FE(gmp_com, arginfo_gmp_com)
+       ZEND_FE(gmp_xor, arginfo_gmp_xor)
+       ZEND_FE(gmp_setbit, arginfo_gmp_setbit)
+       ZEND_FE(gmp_clrbit, arginfo_gmp_clrbit)
+       ZEND_FE(gmp_testbit, arginfo_gmp_testbit)
+       ZEND_FE(gmp_scan0, arginfo_gmp_scan0)
+       ZEND_FE(gmp_scan1, arginfo_gmp_scan1)
+       ZEND_FE(gmp_popcount, arginfo_gmp_popcount)
+       ZEND_FE(gmp_hamdist, arginfo_gmp_hamdist)
+       ZEND_FE(gmp_nextprime, arginfo_gmp_nextprime)
+       ZEND_FE(gmp_binomial, arginfo_gmp_binomial)
+       ZEND_FE_END
+};
index 5f2456e989338a7688aef490e07cc049f563d0c3..9db9d696de2aca42c2781a028003354f571a6cf5 100644 (file)
@@ -29,58 +29,6 @@ ZEND_MODULE_STARTUP_D(gmp);
 ZEND_MODULE_DEACTIVATE_D(gmp);
 ZEND_MODULE_INFO_D(gmp);
 
-ZEND_FUNCTION(gmp_init);
-ZEND_FUNCTION(gmp_import);
-ZEND_FUNCTION(gmp_export);
-ZEND_FUNCTION(gmp_intval);
-ZEND_FUNCTION(gmp_strval);
-ZEND_FUNCTION(gmp_add);
-ZEND_FUNCTION(gmp_sub);
-ZEND_FUNCTION(gmp_mul);
-ZEND_FUNCTION(gmp_div_qr);
-ZEND_FUNCTION(gmp_div_q);
-ZEND_FUNCTION(gmp_div_r);
-ZEND_FUNCTION(gmp_mod);
-ZEND_FUNCTION(gmp_divexact);
-ZEND_FUNCTION(gmp_neg);
-ZEND_FUNCTION(gmp_abs);
-ZEND_FUNCTION(gmp_fact);
-ZEND_FUNCTION(gmp_sqrt);
-ZEND_FUNCTION(gmp_sqrtrem);
-ZEND_FUNCTION(gmp_root);
-ZEND_FUNCTION(gmp_rootrem);
-ZEND_FUNCTION(gmp_pow);
-ZEND_FUNCTION(gmp_powm);
-ZEND_FUNCTION(gmp_perfect_square);
-ZEND_FUNCTION(gmp_perfect_power);
-ZEND_FUNCTION(gmp_prob_prime);
-ZEND_FUNCTION(gmp_gcd);
-ZEND_FUNCTION(gmp_gcdext);
-ZEND_FUNCTION(gmp_invert);
-ZEND_FUNCTION(gmp_jacobi);
-ZEND_FUNCTION(gmp_legendre);
-ZEND_FUNCTION(gmp_kronecker);
-ZEND_FUNCTION(gmp_cmp);
-ZEND_FUNCTION(gmp_sign);
-ZEND_FUNCTION(gmp_and);
-ZEND_FUNCTION(gmp_or);
-ZEND_FUNCTION(gmp_com);
-ZEND_FUNCTION(gmp_xor);
-ZEND_FUNCTION(gmp_random);
-ZEND_FUNCTION(gmp_random_seed);
-ZEND_FUNCTION(gmp_random_bits);
-ZEND_FUNCTION(gmp_random_range);
-ZEND_FUNCTION(gmp_setbit);
-ZEND_FUNCTION(gmp_clrbit);
-ZEND_FUNCTION(gmp_scan0);
-ZEND_FUNCTION(gmp_scan1);
-ZEND_FUNCTION(gmp_testbit);
-ZEND_FUNCTION(gmp_popcount);
-ZEND_FUNCTION(gmp_hamdist);
-ZEND_FUNCTION(gmp_nextprime);
-ZEND_FUNCTION(gmp_binomial);
-ZEND_FUNCTION(gmp_lcm);
-
 ZEND_BEGIN_MODULE_GLOBALS(gmp)
        zend_bool rand_initialized;
        gmp_randstate_t rand_state;
index 7f58060158055ec95f53f3294253112de01174ff..27912bbd101a825dbd7bff1f951fa711037d6a1a 100644 (file)
@@ -1302,46 +1302,12 @@ PHP_MINFO_FUNCTION(hash)
 }
 /* }}} */
 
-/* {{{ hash_functions[]
- */
-static const zend_function_entry hash_functions[] = {
-       PHP_FE(hash,                                                                    arginfo_hash)
-       PHP_FE(hash_file,                                                               arginfo_hash_file)
-
-       PHP_FE(hash_hmac,                                                               arginfo_hash_hmac)
-       PHP_FE(hash_hmac_file,                                                  arginfo_hash_hmac_file)
-
-       PHP_FE(hash_init,                                                               arginfo_hash_init)
-       PHP_FE(hash_update,                                                             arginfo_hash_update)
-       PHP_FE(hash_update_stream,                                              arginfo_hash_update_stream)
-       PHP_FE(hash_update_file,                                                arginfo_hash_update_file)
-       PHP_FE(hash_final,                                                              arginfo_hash_final)
-       PHP_FE(hash_copy,                                                               arginfo_hash_copy)
-
-       PHP_FE(hash_algos,                                                              arginfo_hash_algos)
-       PHP_FE(hash_hmac_algos,                                                 arginfo_hash_hmac_algos)
-       PHP_FE(hash_pbkdf2,                                                             arginfo_hash_pbkdf2)
-       PHP_FE(hash_equals,                                                             arginfo_hash_equals)
-       PHP_FE(hash_hkdf,                                                               arginfo_hash_hkdf)
-
-#ifdef PHP_MHASH_BC
-       PHP_FE(mhash_keygen_s2k, arginfo_mhash_keygen_s2k)
-       PHP_FE(mhash_get_block_size, arginfo_mhash_get_block_size)
-       PHP_FE(mhash_get_hash_name, arginfo_mhash_get_hash_name)
-       PHP_FE(mhash_count, arginfo_mhash_count)
-       PHP_FE(mhash, arginfo_mhash)
-#endif
-
-       PHP_FE_END
-};
-/* }}} */
-
 /* {{{ hash_module_entry
  */
 zend_module_entry hash_module_entry = {
        STANDARD_MODULE_HEADER,
        PHP_HASH_EXTNAME,
-       hash_functions,
+       ext_functions,
        PHP_MINIT(hash),
        PHP_MSHUTDOWN(hash),
        NULL, /* RINIT */
index f17084db1d642af9f3507640d8d62e535671008b..e83f38b22cbc79d975e0374fddb0007044dbdee8 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+/** @generate-function-entries */
+
 function hash(string $algo, string $data, bool $raw_output = false): string|false {}
 
 function hash_file(string $algo, string $filename, bool $raw_output = false): string|false {}
index 27083f35bd34cd7eb8795fcb8d1fa580ce0bf6f0..40529aeff8fcc19802f603d3fb3c60679dd6c693 100644 (file)
@@ -116,3 +116,70 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_HashContext___construct, 0, 0, 0)
 ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(hash);
+ZEND_FUNCTION(hash_file);
+ZEND_FUNCTION(hash_hmac);
+ZEND_FUNCTION(hash_hmac_file);
+ZEND_FUNCTION(hash_init);
+ZEND_FUNCTION(hash_update);
+ZEND_FUNCTION(hash_update_stream);
+ZEND_FUNCTION(hash_update_file);
+ZEND_FUNCTION(hash_final);
+ZEND_FUNCTION(hash_copy);
+ZEND_FUNCTION(hash_algos);
+ZEND_FUNCTION(hash_hmac_algos);
+ZEND_FUNCTION(hash_pbkdf2);
+ZEND_FUNCTION(hash_equals);
+ZEND_FUNCTION(hash_hkdf);
+#if defined(PHP_MHASH_BC)
+ZEND_FUNCTION(mhash_get_block_size);
+#endif
+#if defined(PHP_MHASH_BC)
+ZEND_FUNCTION(mhash_get_hash_name);
+#endif
+#if defined(PHP_MHASH_BC)
+ZEND_FUNCTION(mhash_keygen_s2k);
+#endif
+#if defined(PHP_MHASH_BC)
+ZEND_FUNCTION(mhash_count);
+#endif
+#if defined(PHP_MHASH_BC)
+ZEND_FUNCTION(mhash);
+#endif
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(hash, arginfo_hash)
+       ZEND_FE(hash_file, arginfo_hash_file)
+       ZEND_FE(hash_hmac, arginfo_hash_hmac)
+       ZEND_FE(hash_hmac_file, arginfo_hash_hmac_file)
+       ZEND_FE(hash_init, arginfo_hash_init)
+       ZEND_FE(hash_update, arginfo_hash_update)
+       ZEND_FE(hash_update_stream, arginfo_hash_update_stream)
+       ZEND_FE(hash_update_file, arginfo_hash_update_file)
+       ZEND_FE(hash_final, arginfo_hash_final)
+       ZEND_FE(hash_copy, arginfo_hash_copy)
+       ZEND_FE(hash_algos, arginfo_hash_algos)
+       ZEND_FE(hash_hmac_algos, arginfo_hash_hmac_algos)
+       ZEND_FE(hash_pbkdf2, arginfo_hash_pbkdf2)
+       ZEND_FE(hash_equals, arginfo_hash_equals)
+       ZEND_FE(hash_hkdf, arginfo_hash_hkdf)
+#if defined(PHP_MHASH_BC)
+       ZEND_FE(mhash_get_block_size, arginfo_mhash_get_block_size)
+#endif
+#if defined(PHP_MHASH_BC)
+       ZEND_FE(mhash_get_hash_name, arginfo_mhash_get_hash_name)
+#endif
+#if defined(PHP_MHASH_BC)
+       ZEND_FE(mhash_keygen_s2k, arginfo_mhash_keygen_s2k)
+#endif
+#if defined(PHP_MHASH_BC)
+       ZEND_FE(mhash_count, arginfo_mhash_count)
+#endif
+#if defined(PHP_MHASH_BC)
+       ZEND_FE(mhash, arginfo_mhash)
+#endif
+       ZEND_FE_END
+};
index f7cdaac305cb849ed1aa1366db2deb123435b898..79bbc066d6c83f1f78dbb30cb497ef5a03bf0941 100644 (file)
@@ -127,20 +127,6 @@ extern zend_module_entry hash_module_entry;
 #      define PHP_HASH_API
 #endif
 
-PHP_FUNCTION(hash);
-PHP_FUNCTION(hash_file);
-PHP_FUNCTION(hash_hkdf);
-PHP_FUNCTION(hash_hmac);
-PHP_FUNCTION(hash_hmac_file);
-PHP_FUNCTION(hash_init);
-PHP_FUNCTION(hash_update);
-PHP_FUNCTION(hash_update_stream);
-PHP_FUNCTION(hash_update_file);
-PHP_FUNCTION(hash_final);
-PHP_FUNCTION(hash_algos);
-PHP_FUNCTION(hash_pbkdf2);
-PHP_FUNCTION(hash_equals);
-
 extern PHP_HASH_API zend_class_entry *php_hashcontext_ce;
 PHP_HASH_API const php_hash_ops *php_hash_fetch_ops(zend_string *algo);
 PHP_HASH_API void php_hash_register_algo(const char *algo, const php_hash_ops *ops);
index 80af1dc8b9edbd22010c965342f72870e08d188a..7cda884a6537573568fa0c761e469a9d109ddcdd 100644 (file)
 #define _php_iconv_memequal(a, b, c) \
        (memcmp(a, b, c) == 0)
 
-/* {{{ iconv_functions[]
- */
-static const zend_function_entry iconv_functions[] = {
-       PHP_RAW_NAMED_FE(iconv,php_if_iconv,                            arginfo_iconv)
-       PHP_FE(iconv_get_encoding,                                              arginfo_iconv_get_encoding)
-       PHP_FE(iconv_set_encoding,                                              arginfo_iconv_set_encoding)
-       PHP_FE(iconv_strlen,                                                    arginfo_iconv_strlen)
-       PHP_FE(iconv_substr,                                                    arginfo_iconv_substr)
-       PHP_FE(iconv_strpos,                                                    arginfo_iconv_strpos)
-       PHP_FE(iconv_strrpos,                                                   arginfo_iconv_strrpos)
-       PHP_FE(iconv_mime_encode,                                               arginfo_iconv_mime_encode)
-       PHP_FE(iconv_mime_decode,                                               arginfo_iconv_mime_decode)
-       PHP_FE(iconv_mime_decode_headers,                               arginfo_iconv_mime_decode_headers)
-       PHP_FE_END
-};
-/* }}} */
-
 ZEND_DECLARE_MODULE_GLOBALS(iconv)
 static PHP_GINIT_FUNCTION(iconv);
 
@@ -81,7 +64,7 @@ static PHP_GINIT_FUNCTION(iconv);
 zend_module_entry iconv_module_entry = {
        STANDARD_MODULE_HEADER,
        "iconv",
-       iconv_functions,
+       ext_functions,
        PHP_MINIT(miconv),
        PHP_MSHUTDOWN(miconv),
        NULL,
@@ -2249,7 +2232,7 @@ PHP_FUNCTION(iconv_mime_decode_headers)
 
 /* {{{ proto string iconv(string in_charset, string out_charset, string str)
    Returns str converted to the out_charset character set */
-PHP_NAMED_FUNCTION(php_if_iconv)
+PHP_FUNCTION(iconv)
 {
        char *in_charset, *out_charset;
        zend_string *in_buffer;
index cd9bab3ad0e98747e0f4fbf5a63f8ade63f02f26..ae2a0fa0cbf4961f287e342413575aba852ac152 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+/** @generate-function-entries */
+
 function iconv_strlen(string $str, string $charset = UNKNOWN): int|false {}
 
 function iconv_substr(string $str, int $offset, ?int $length = null, string $charset = UNKNOWN): string|false {}
index 51f11cf7942610f314c6ab502c313ba3b62156d4..3a05ba633fcee24fc3e5bcd8d9e63ff9b33839c6 100644 (file)
@@ -57,3 +57,30 @@ ZEND_END_ARG_INFO()
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_get_encoding, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0)
 ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(iconv_strlen);
+ZEND_FUNCTION(iconv_substr);
+ZEND_FUNCTION(iconv_strpos);
+ZEND_FUNCTION(iconv_strrpos);
+ZEND_FUNCTION(iconv_mime_encode);
+ZEND_FUNCTION(iconv_mime_decode);
+ZEND_FUNCTION(iconv_mime_decode_headers);
+ZEND_FUNCTION(iconv);
+ZEND_FUNCTION(iconv_set_encoding);
+ZEND_FUNCTION(iconv_get_encoding);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(iconv_strlen, arginfo_iconv_strlen)
+       ZEND_FE(iconv_substr, arginfo_iconv_substr)
+       ZEND_FE(iconv_strpos, arginfo_iconv_strpos)
+       ZEND_FE(iconv_strrpos, arginfo_iconv_strrpos)
+       ZEND_FE(iconv_mime_encode, arginfo_iconv_mime_encode)
+       ZEND_FE(iconv_mime_decode, arginfo_iconv_mime_decode)
+       ZEND_FE(iconv_mime_decode_headers, arginfo_iconv_mime_decode_headers)
+       ZEND_FE(iconv, arginfo_iconv)
+       ZEND_FE(iconv_set_encoding, arginfo_iconv_set_encoding)
+       ZEND_FE(iconv_get_encoding, arginfo_iconv_get_encoding)
+       ZEND_FE_END
+};
index f473e24caa381853a8bb246833b1a45ecca1eae8..d2c418e95a348cc54de0d15d2b26986d6bc308ba 100644 (file)
@@ -96,96 +96,6 @@ void *fs_get(size_t size);
 ZEND_DECLARE_MODULE_GLOBALS(imap)
 static PHP_GINIT_FUNCTION(imap);
 
-
-/* {{{ imap_functions[]
- */
-static const zend_function_entry imap_functions[] = {
-       PHP_FE(imap_open,                                                               arginfo_imap_open)
-       PHP_FE(imap_reopen,                                                             arginfo_imap_reopen)
-       PHP_FE(imap_close,                                                              arginfo_imap_close)
-       PHP_FE(imap_num_msg,                                                    arginfo_imap_num_msg)
-       PHP_FE(imap_num_recent,                                                 arginfo_imap_num_recent)
-       PHP_FE(imap_headers,                                                    arginfo_imap_headers)
-       PHP_FE(imap_headerinfo,                                                 arginfo_imap_headerinfo)
-       PHP_FE(imap_rfc822_parse_headers,                               arginfo_imap_rfc822_parse_headers)
-       PHP_FE(imap_rfc822_write_address,                               arginfo_imap_rfc822_write_address)
-       PHP_FE(imap_rfc822_parse_adrlist,                               arginfo_imap_rfc822_parse_adrlist)
-       PHP_FE(imap_body,                                                               arginfo_imap_body)
-       PHP_FE(imap_bodystruct,                                                 arginfo_imap_bodystruct)
-       PHP_FE(imap_fetchbody,                                                  arginfo_imap_fetchbody)
-       PHP_FE(imap_fetchmime,                                                  arginfo_imap_fetchmime)
-       PHP_FE(imap_savebody,                                                   arginfo_imap_savebody)
-       PHP_FE(imap_fetchheader,                                                arginfo_imap_fetchheader)
-       PHP_FE(imap_fetchstructure,                                             arginfo_imap_fetchstructure)
-       PHP_FE(imap_gc,                                                                         arginfo_imap_gc)
-       PHP_FE(imap_expunge,                                                    arginfo_imap_expunge)
-       PHP_FE(imap_delete,                                                             arginfo_imap_delete)
-       PHP_FE(imap_undelete,                                                   arginfo_imap_undelete)
-       PHP_FE(imap_check,                                                              arginfo_imap_check)
-       PHP_FE(imap_listscan,                                                   arginfo_imap_listscan)
-       PHP_FE(imap_mail_copy,                                                  arginfo_imap_mail_copy)
-       PHP_FE(imap_mail_move,                                                  arginfo_imap_mail_move)
-       PHP_FE(imap_mail_compose,                                               arginfo_imap_mail_compose)
-       PHP_FE(imap_createmailbox,                                              arginfo_imap_createmailbox)
-       PHP_FE(imap_renamemailbox,                                              arginfo_imap_renamemailbox)
-       PHP_FE(imap_deletemailbox,                                              arginfo_imap_deletemailbox)
-       PHP_FE(imap_subscribe,                                                  arginfo_imap_subscribe)
-       PHP_FE(imap_unsubscribe,                                                arginfo_imap_unsubscribe)
-       PHP_FE(imap_append,                                                             arginfo_imap_append)
-       PHP_FE(imap_ping,                                                               arginfo_imap_ping)
-       PHP_FE(imap_base64,                                                             arginfo_imap_base64)
-       PHP_FE(imap_qprint,                                                             arginfo_imap_qprint)
-       PHP_FE(imap_8bit,                                                               arginfo_imap_8bit)
-       PHP_FE(imap_binary,                                                             arginfo_imap_binary)
-       PHP_FE(imap_utf8,                                                               arginfo_imap_utf8)
-       PHP_FE(imap_status,                                                             arginfo_imap_status)
-       PHP_FE(imap_mailboxmsginfo,                                             arginfo_imap_mailboxmsginfo)
-       PHP_FE(imap_setflag_full,                                               arginfo_imap_setflag_full)
-       PHP_FE(imap_clearflag_full,                                             arginfo_imap_clearflag_full)
-       PHP_FE(imap_sort,                                                               arginfo_imap_sort)
-       PHP_FE(imap_uid,                                                                arginfo_imap_uid)
-       PHP_FE(imap_msgno,                                                              arginfo_imap_msgno)
-       PHP_FE(imap_list,                                                               arginfo_imap_list)
-       PHP_FE(imap_lsub,                                                               arginfo_imap_lsub)
-       PHP_FE(imap_fetch_overview,                                             arginfo_imap_fetch_overview)
-       PHP_FE(imap_alerts,                                                             arginfo_imap_alerts)
-       PHP_FE(imap_errors,                                                             arginfo_imap_errors)
-       PHP_FE(imap_last_error,                                                 arginfo_imap_last_error)
-       PHP_FE(imap_search,                                                             arginfo_imap_search)
-       PHP_FE(imap_utf7_decode,                                                arginfo_imap_utf7_decode)
-       PHP_FE(imap_utf7_encode,                                                arginfo_imap_utf7_encode)
-#ifdef HAVE_IMAP_MUTF7
-       PHP_FE(imap_utf8_to_mutf7,                                              arginfo_imap_utf8_to_mutf7)
-       PHP_FE(imap_mutf7_to_utf8,                                              arginfo_imap_mutf7_to_utf8)
-#endif
-       PHP_FE(imap_mime_header_decode,                                 arginfo_imap_mime_header_decode)
-       PHP_FE(imap_thread,                                                             arginfo_imap_thread)
-       PHP_FE(imap_timeout,                                                            arginfo_imap_timeout)
-
-#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
-       PHP_FE(imap_get_quota,                                                  arginfo_imap_get_quota)
-       PHP_FE(imap_get_quotaroot,                                              arginfo_imap_get_quotaroot)
-       PHP_FE(imap_set_quota,                                                  arginfo_imap_set_quota)
-       PHP_FE(imap_setacl,                                                             arginfo_imap_setacl)
-       PHP_FE(imap_getacl,                                                             arginfo_imap_getacl)
-#endif
-
-       PHP_FE(imap_mail,                                                               arginfo_imap_mail)
-       PHP_FE(imap_getsubscribed,                                              arginfo_imap_getsubscribed)
-       PHP_FE(imap_getmailboxes,                                               arginfo_imap_getmailboxes)
-
-       PHP_FALIAS(imap_header,                 imap_headerinfo,        arginfo_imap_header)
-       PHP_FALIAS(imap_listmailbox,    imap_list,                      arginfo_imap_listmailbox)
-       PHP_FALIAS(imap_scanmailbox,    imap_listscan,          arginfo_imap_scanmailbox)
-       PHP_FALIAS(imap_listsubscribed, imap_lsub,                      arginfo_imap_listsubscribed)
-       PHP_FALIAS(imap_fetchtext,              imap_body,                      arginfo_imap_fetchtext)
-       PHP_FALIAS(imap_scan,                   imap_listscan,          arginfo_imap_scan)
-       PHP_FALIAS(imap_create,                 imap_createmailbox,     arginfo_imap_create)
-       PHP_FALIAS(imap_rename,                 imap_renamemailbox,     arginfo_imap_rename)
-       PHP_FE_END
-};
-/* }}} */
-
 /* {{{ imap dependencies */
 static const zend_module_dep imap_deps[] = {
        ZEND_MOD_REQUIRED("standard")
@@ -208,7 +118,7 @@ zend_module_entry imap_module_entry = {
        STANDARD_MODULE_HEADER_EX, NULL,
        imap_deps,
        "imap",
-       imap_functions,
+       ext_functions,
        PHP_MINIT(imap),
        NULL,
        PHP_RINIT(imap),
index 201999894213d0dd15ffe168a6fe6d088bd536e8..ae5dfe7b94451212758e3dcfc0c4a37f9f76f99f 100644 (file)
@@ -116,86 +116,6 @@ PHP_RINIT_FUNCTION(imap);
 PHP_RSHUTDOWN_FUNCTION(imap);
 PHP_MINFO_FUNCTION(imap);
 
-PHP_FUNCTION(imap_open);
-PHP_FUNCTION(imap_popen);
-PHP_FUNCTION(imap_reopen);
-PHP_FUNCTION(imap_num_msg);
-PHP_FUNCTION(imap_num_recent);
-PHP_FUNCTION(imap_headers);
-PHP_FUNCTION(imap_headerinfo);
-PHP_FUNCTION(imap_rfc822_parse_headers);
-PHP_FUNCTION(imap_body);
-PHP_FUNCTION(imap_fetchstructure);
-PHP_FUNCTION(imap_fetchbody);
-PHP_FUNCTION(imap_fetchmime);
-PHP_FUNCTION(imap_savebody);
-PHP_FUNCTION(imap_gc);
-PHP_FUNCTION(imap_expunge);
-PHP_FUNCTION(imap_delete);
-PHP_FUNCTION(imap_undelete);
-PHP_FUNCTION(imap_check);
-PHP_FUNCTION(imap_close);
-PHP_FUNCTION(imap_mail_copy);
-PHP_FUNCTION(imap_mail_move);
-PHP_FUNCTION(imap_createmailbox);
-PHP_FUNCTION(imap_renamemailbox);
-PHP_FUNCTION(imap_deletemailbox);
-PHP_FUNCTION(imap_listmailbox);
-PHP_FUNCTION(imap_scanmailbox);
-PHP_FUNCTION(imap_subscribe);
-PHP_FUNCTION(imap_unsubscribe);
-PHP_FUNCTION(imap_append);
-PHP_FUNCTION(imap_ping);
-PHP_FUNCTION(imap_base64);
-PHP_FUNCTION(imap_qprint);
-PHP_FUNCTION(imap_8bit);
-PHP_FUNCTION(imap_binary);
-PHP_FUNCTION(imap_mailboxmsginfo);
-PHP_FUNCTION(imap_rfc822_write_address);
-PHP_FUNCTION(imap_rfc822_parse_adrlist);
-PHP_FUNCTION(imap_setflag_full);
-PHP_FUNCTION(imap_clearflag_full);
-PHP_FUNCTION(imap_sort);
-PHP_FUNCTION(imap_fetchheader);
-PHP_FUNCTION(imap_fetchtext);
-PHP_FUNCTION(imap_uid);
-PHP_FUNCTION(imap_msgno);
-PHP_FUNCTION(imap_list);
-PHP_FUNCTION(imap_getmailboxes);
-PHP_FUNCTION(imap_listscan);
-PHP_FUNCTION(imap_lsub);
-PHP_FUNCTION(imap_getsubscribed);
-PHP_FUNCTION(imap_create);
-PHP_FUNCTION(imap_rename);
-PHP_FUNCTION(imap_status);
-PHP_FUNCTION(imap_bodystruct);
-PHP_FUNCTION(imap_fetch_overview);
-PHP_FUNCTION(imap_mail_compose);
-PHP_FUNCTION(imap_alerts);
-PHP_FUNCTION(imap_errors);
-PHP_FUNCTION(imap_last_error);
-PHP_FUNCTION(imap_mail);
-PHP_FUNCTION(imap_search);
-PHP_FUNCTION(imap_utf8);
-PHP_FUNCTION(imap_utf7_decode);
-PHP_FUNCTION(imap_utf7_encode);
-#ifdef HAVE_IMAP_MUTF7
-PHP_FUNCTION(imap_utf8_to_mutf7);
-PHP_FUNCTION(imap_mutf7_to_utf8);
-#endif
-PHP_FUNCTION(imap_mime_header_decode);
-PHP_FUNCTION(imap_thread);
-PHP_FUNCTION(imap_timeout);
-
-#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
-PHP_FUNCTION(imap_get_quota);
-PHP_FUNCTION(imap_get_quotaroot);
-PHP_FUNCTION(imap_set_quota);
-PHP_FUNCTION(imap_setacl);
-PHP_FUNCTION(imap_getacl);
-#endif
-
-
 ZEND_BEGIN_MODULE_GLOBALS(imap)
        char *imap_user;
        char *imap_password;
index 1366a0fc06a73887e6067fb3f76d38f497104087..2ed20ba4e3d060c69246e7d8f91506b00ef4824b 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+/** @generate-function-entries */
+
 /**
  * @return resource|false
  */
index df274969e7fca243663053880451e4742809ea09..e963504dbf94652ce46caa1c06ab08c00692c162 100644 (file)
@@ -346,3 +346,180 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail, 0, 3, _IS_BOOL, 0)
        ZEND_ARG_TYPE_INFO(0, bcc, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, rpath, IS_STRING, 0)
 ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(imap_open);
+ZEND_FUNCTION(imap_reopen);
+ZEND_FUNCTION(imap_close);
+ZEND_FUNCTION(imap_num_msg);
+ZEND_FUNCTION(imap_num_recent);
+ZEND_FUNCTION(imap_headers);
+ZEND_FUNCTION(imap_headerinfo);
+ZEND_FUNCTION(imap_rfc822_parse_headers);
+ZEND_FUNCTION(imap_rfc822_write_address);
+ZEND_FUNCTION(imap_rfc822_parse_adrlist);
+ZEND_FUNCTION(imap_body);
+ZEND_FUNCTION(imap_bodystruct);
+ZEND_FUNCTION(imap_fetchbody);
+ZEND_FUNCTION(imap_fetchmime);
+ZEND_FUNCTION(imap_savebody);
+ZEND_FUNCTION(imap_fetchheader);
+ZEND_FUNCTION(imap_fetchstructure);
+ZEND_FUNCTION(imap_gc);
+ZEND_FUNCTION(imap_expunge);
+ZEND_FUNCTION(imap_delete);
+ZEND_FUNCTION(imap_undelete);
+ZEND_FUNCTION(imap_check);
+ZEND_FUNCTION(imap_listscan);
+ZEND_FUNCTION(imap_mail_copy);
+ZEND_FUNCTION(imap_mail_move);
+ZEND_FUNCTION(imap_mail_compose);
+ZEND_FUNCTION(imap_createmailbox);
+ZEND_FUNCTION(imap_renamemailbox);
+ZEND_FUNCTION(imap_deletemailbox);
+ZEND_FUNCTION(imap_subscribe);
+ZEND_FUNCTION(imap_unsubscribe);
+ZEND_FUNCTION(imap_append);
+ZEND_FUNCTION(imap_ping);
+ZEND_FUNCTION(imap_base64);
+ZEND_FUNCTION(imap_qprint);
+ZEND_FUNCTION(imap_8bit);
+ZEND_FUNCTION(imap_binary);
+ZEND_FUNCTION(imap_utf8);
+ZEND_FUNCTION(imap_status);
+ZEND_FUNCTION(imap_mailboxmsginfo);
+ZEND_FUNCTION(imap_setflag_full);
+ZEND_FUNCTION(imap_clearflag_full);
+ZEND_FUNCTION(imap_sort);
+ZEND_FUNCTION(imap_uid);
+ZEND_FUNCTION(imap_msgno);
+ZEND_FUNCTION(imap_list);
+ZEND_FUNCTION(imap_lsub);
+ZEND_FUNCTION(imap_getsubscribed);
+ZEND_FUNCTION(imap_getmailboxes);
+ZEND_FUNCTION(imap_fetch_overview);
+ZEND_FUNCTION(imap_alerts);
+ZEND_FUNCTION(imap_errors);
+ZEND_FUNCTION(imap_last_error);
+ZEND_FUNCTION(imap_search);
+ZEND_FUNCTION(imap_utf7_decode);
+ZEND_FUNCTION(imap_utf7_encode);
+#if defined(HAVE_IMAP_MUTF7)
+ZEND_FUNCTION(imap_utf8_to_mutf7);
+#endif
+#if defined(HAVE_IMAP_MUTF7)
+ZEND_FUNCTION(imap_mutf7_to_utf8);
+#endif
+ZEND_FUNCTION(imap_mime_header_decode);
+ZEND_FUNCTION(imap_thread);
+ZEND_FUNCTION(imap_timeout);
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+ZEND_FUNCTION(imap_get_quota);
+#endif
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+ZEND_FUNCTION(imap_get_quotaroot);
+#endif
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+ZEND_FUNCTION(imap_set_quota);
+#endif
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+ZEND_FUNCTION(imap_setacl);
+#endif
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+ZEND_FUNCTION(imap_getacl);
+#endif
+ZEND_FUNCTION(imap_mail);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(imap_open, arginfo_imap_open)
+       ZEND_FE(imap_reopen, arginfo_imap_reopen)
+       ZEND_FE(imap_close, arginfo_imap_close)
+       ZEND_FE(imap_num_msg, arginfo_imap_num_msg)
+       ZEND_FE(imap_num_recent, arginfo_imap_num_recent)
+       ZEND_FE(imap_headers, arginfo_imap_headers)
+       ZEND_FE(imap_headerinfo, arginfo_imap_headerinfo)
+       ZEND_FALIAS(imap_header, imap_headerinfo, arginfo_imap_header)
+       ZEND_FE(imap_rfc822_parse_headers, arginfo_imap_rfc822_parse_headers)
+       ZEND_FE(imap_rfc822_write_address, arginfo_imap_rfc822_write_address)
+       ZEND_FE(imap_rfc822_parse_adrlist, arginfo_imap_rfc822_parse_adrlist)
+       ZEND_FE(imap_body, arginfo_imap_body)
+       ZEND_FALIAS(imap_fetchtext, imap_body, arginfo_imap_fetchtext)
+       ZEND_FE(imap_bodystruct, arginfo_imap_bodystruct)
+       ZEND_FE(imap_fetchbody, arginfo_imap_fetchbody)
+       ZEND_FE(imap_fetchmime, arginfo_imap_fetchmime)
+       ZEND_FE(imap_savebody, arginfo_imap_savebody)
+       ZEND_FE(imap_fetchheader, arginfo_imap_fetchheader)
+       ZEND_FE(imap_fetchstructure, arginfo_imap_fetchstructure)
+       ZEND_FE(imap_gc, arginfo_imap_gc)
+       ZEND_FE(imap_expunge, arginfo_imap_expunge)
+       ZEND_FE(imap_delete, arginfo_imap_delete)
+       ZEND_FE(imap_undelete, arginfo_imap_undelete)
+       ZEND_FE(imap_check, arginfo_imap_check)
+       ZEND_FE(imap_listscan, arginfo_imap_listscan)
+       ZEND_FALIAS(imap_scan, imap_listscan, arginfo_imap_scan)
+       ZEND_FALIAS(imap_scanmailbox, imap_listscan, arginfo_imap_scanmailbox)
+       ZEND_FE(imap_mail_copy, arginfo_imap_mail_copy)
+       ZEND_FE(imap_mail_move, arginfo_imap_mail_move)
+       ZEND_FE(imap_mail_compose, arginfo_imap_mail_compose)
+       ZEND_FE(imap_createmailbox, arginfo_imap_createmailbox)
+       ZEND_FALIAS(imap_create, imap_createmailbox, arginfo_imap_create)
+       ZEND_FE(imap_renamemailbox, arginfo_imap_renamemailbox)
+       ZEND_FALIAS(imap_rename, imap_renamemailbox, arginfo_imap_rename)
+       ZEND_FE(imap_deletemailbox, arginfo_imap_deletemailbox)
+       ZEND_FE(imap_subscribe, arginfo_imap_subscribe)
+       ZEND_FE(imap_unsubscribe, arginfo_imap_unsubscribe)
+       ZEND_FE(imap_append, arginfo_imap_append)
+       ZEND_FE(imap_ping, arginfo_imap_ping)
+       ZEND_FE(imap_base64, arginfo_imap_base64)
+       ZEND_FE(imap_qprint, arginfo_imap_qprint)
+       ZEND_FE(imap_8bit, arginfo_imap_8bit)
+       ZEND_FE(imap_binary, arginfo_imap_binary)
+       ZEND_FE(imap_utf8, arginfo_imap_utf8)
+       ZEND_FE(imap_status, arginfo_imap_status)
+       ZEND_FE(imap_mailboxmsginfo, arginfo_imap_mailboxmsginfo)
+       ZEND_FE(imap_setflag_full, arginfo_imap_setflag_full)
+       ZEND_FE(imap_clearflag_full, arginfo_imap_clearflag_full)
+       ZEND_FE(imap_sort, arginfo_imap_sort)
+       ZEND_FE(imap_uid, arginfo_imap_uid)
+       ZEND_FE(imap_msgno, arginfo_imap_msgno)
+       ZEND_FE(imap_list, arginfo_imap_list)
+       ZEND_FALIAS(imap_listmailbox, imap_list, arginfo_imap_listmailbox)
+       ZEND_FE(imap_lsub, arginfo_imap_lsub)
+       ZEND_FALIAS(imap_listsubscribed, imap_lsub, arginfo_imap_listsubscribed)
+       ZEND_FE(imap_getsubscribed, arginfo_imap_getsubscribed)
+       ZEND_FE(imap_getmailboxes, arginfo_imap_getmailboxes)
+       ZEND_FE(imap_fetch_overview, arginfo_imap_fetch_overview)
+       ZEND_FE(imap_alerts, arginfo_imap_alerts)
+       ZEND_FE(imap_errors, arginfo_imap_errors)
+       ZEND_FE(imap_last_error, arginfo_imap_last_error)
+       ZEND_FE(imap_search, arginfo_imap_search)
+       ZEND_FE(imap_utf7_decode, arginfo_imap_utf7_decode)
+       ZEND_FE(imap_utf7_encode, arginfo_imap_utf7_encode)
+#if defined(HAVE_IMAP_MUTF7)
+       ZEND_FE(imap_utf8_to_mutf7, arginfo_imap_utf8_to_mutf7)
+#endif
+#if defined(HAVE_IMAP_MUTF7)
+       ZEND_FE(imap_mutf7_to_utf8, arginfo_imap_mutf7_to_utf8)
+#endif
+       ZEND_FE(imap_mime_header_decode, arginfo_imap_mime_header_decode)
+       ZEND_FE(imap_thread, arginfo_imap_thread)
+       ZEND_FE(imap_timeout, arginfo_imap_timeout)
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+       ZEND_FE(imap_get_quota, arginfo_imap_get_quota)
+#endif
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+       ZEND_FE(imap_get_quotaroot, arginfo_imap_get_quotaroot)
+#endif
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+       ZEND_FE(imap_set_quota, arginfo_imap_set_quota)
+#endif
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+       ZEND_FE(imap_setacl, arginfo_imap_setacl)
+#endif
+#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+       ZEND_FE(imap_getacl, arginfo_imap_getacl)
+#endif
+       ZEND_FE(imap_mail, arginfo_imap_mail)
+       ZEND_FE_END
+};
index 10ec93e220aa9bfe1dfa1121c4438445379bb409..b78de3ea16bc3b833245f966ed400a72191a22cd 100644 (file)
 #include <zend_exceptions.h>
 
 static PHP_MINFO_FUNCTION(json);
-static PHP_FUNCTION(json_encode);
-static PHP_FUNCTION(json_decode);
-static PHP_FUNCTION(json_last_error);
-static PHP_FUNCTION(json_last_error_msg);
 
 PHP_JSON_API zend_class_entry *php_json_serializable_ce;
 PHP_JSON_API zend_class_entry *php_json_exception_ce;
 
 PHP_JSON_API ZEND_DECLARE_MODULE_GLOBALS(json)
 
-/* {{{ json_functions[] */
-static const zend_function_entry json_functions[] = {
-       PHP_FE(json_encode, arginfo_json_encode)
-       PHP_FE(json_decode, arginfo_json_decode)
-       PHP_FE(json_last_error, arginfo_json_last_error)
-       PHP_FE(json_last_error_msg, arginfo_json_last_error_msg)
-       PHP_FE_END
-};
-/* }}} */
-
 /* {{{ JsonSerializable methods */
 static const zend_function_entry json_serializable_interface[] = {
        PHP_ABSTRACT_ME(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize)
@@ -132,7 +118,7 @@ static PHP_GINIT_FUNCTION(json)
 zend_module_entry json_module_entry = {
        STANDARD_MODULE_HEADER,
        "json",
-       json_functions,
+       ext_functions,
        PHP_MINIT(json),
        NULL,
        NULL,
@@ -239,7 +225,7 @@ PHP_JSON_API int php_json_decode_ex(zval *return_value, char *str, size_t str_le
 
 /* {{{ proto string json_encode(mixed data [, int options[, int depth]])
    Returns the JSON representation of a value */
-static PHP_FUNCTION(json_encode)
+PHP_FUNCTION(json_encode)
 {
        zval *parameter;
        php_json_encoder encoder;
@@ -282,7 +268,7 @@ static PHP_FUNCTION(json_encode)
 
 /* {{{ proto mixed json_decode(string json [, bool assoc [, int depth]])
    Decodes the JSON representation into a PHP value */
-static PHP_FUNCTION(json_decode)
+PHP_FUNCTION(json_decode)
 {
        char *str;
        size_t str_len;
@@ -337,7 +323,7 @@ static PHP_FUNCTION(json_decode)
 
 /* {{{ proto int json_last_error()
    Returns the error code of the last json_encode() or json_decode() call. */
-static PHP_FUNCTION(json_last_error)
+PHP_FUNCTION(json_last_error)
 {
        ZEND_PARSE_PARAMETERS_NONE();
 
@@ -347,7 +333,7 @@ static PHP_FUNCTION(json_last_error)
 
 /* {{{ proto string json_last_error_msg()
    Returns the error string of the last json_encode() or json_decode() call. */
-static PHP_FUNCTION(json_last_error_msg)
+PHP_FUNCTION(json_last_error_msg)
 {
        ZEND_PARSE_PARAMETERS_NONE();
 
index c5713a7980d40671fadc26650c48dc0cca4d50aa..406bd8a87c86936cdb1277f002323946c84ffc62 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+/** @generate-function-entries */
+
 function json_encode($value, int $options = 0, int $depth = 512): string|false {}
 
 /** @return mixed */
index 2a06f84f6ce6c7fde16727688b2e90fa26f2d520..cf062421355627ff2f32b8337981796aca286af4 100644 (file)
@@ -21,3 +21,18 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_JsonSerializable_jsonSerialize, 0, 0, 0)
 ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(json_encode);
+ZEND_FUNCTION(json_decode);
+ZEND_FUNCTION(json_last_error);
+ZEND_FUNCTION(json_last_error_msg);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(json_encode, arginfo_json_encode)
+       ZEND_FE(json_decode, arginfo_json_decode)
+       ZEND_FE(json_last_error, arginfo_json_last_error)
+       ZEND_FE(json_last_error_msg, arginfo_json_last_error_msg)
+       ZEND_FE_END
+};