]> granicus.if.org Git - php/commitdiff
Generate class entries from stubs for another batch of extensions
authorMáté Kocsis <kocsismate@woohoolabs.com>
Fri, 5 Feb 2021 12:46:46 +0000 (13:46 +0100)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Mon, 8 Feb 2021 18:53:55 +0000 (19:53 +0100)
Closes GH-6669

35 files changed:
ext/enchant/enchant.c
ext/enchant/enchant.stub.php
ext/enchant/enchant_arginfo.h
ext/exif/exif.stub.php
ext/exif/exif_arginfo.h
ext/ffi/ffi.c
ext/ffi/ffi.stub.php
ext/ffi/ffi_arginfo.h
ext/fileinfo/fileinfo.c
ext/fileinfo/fileinfo.stub.php
ext/fileinfo/fileinfo_arginfo.h
ext/filter/filter.stub.php
ext/filter/filter_arginfo.h
ext/ftp/ftp.stub.php
ext/ftp/ftp_arginfo.h
ext/ftp/php_ftp.c
ext/gd/gd.c
ext/gd/gd.stub.php
ext/gd/gd_arginfo.h
ext/gettext/gettext.stub.php
ext/gettext/gettext_arginfo.h
ext/gmp/gmp.c
ext/gmp/gmp.stub.php
ext/gmp/gmp_arginfo.h
ext/hash/hash.c
ext/hash/hash.stub.php
ext/hash/hash_arginfo.h
ext/iconv/iconv.stub.php
ext/iconv/iconv_arginfo.h
ext/imap/php_imap.c
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 566197582073cc8b55e6f115cb3ccc5384b4dd71..1b22ad48fbe3ecfcf89fa0659d46448dac7caef5 100644 (file)
@@ -186,11 +186,7 @@ static void php_enchant_dict_free(zend_object *object) /* {{{ */
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(enchant)
 {
-       zend_class_entry bce, dce;
-
-       INIT_CLASS_ENTRY(bce, "EnchantBroker", class_EnchantBroker_methods);
-       enchant_broker_ce = zend_register_internal_class(&bce);
-       enchant_broker_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       enchant_broker_ce = register_class_EnchantBroker();
        enchant_broker_ce->create_object = enchant_broker_create_object;
        enchant_broker_ce->serialize = zend_class_serialize_deny;
        enchant_broker_ce->unserialize = zend_class_unserialize_deny;
@@ -200,9 +196,7 @@ PHP_MINIT_FUNCTION(enchant)
        enchant_broker_handlers.free_obj = php_enchant_broker_free;
        enchant_broker_handlers.clone_obj = NULL;
 
-       INIT_CLASS_ENTRY(dce, "EnchantDictionary", class_EnchantDictionary_methods);
-       enchant_dict_ce = zend_register_internal_class(&dce);
-       enchant_dict_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       enchant_dict_ce = register_class_EnchantDictionary();
        enchant_dict_ce->create_object = enchant_dict_create_object;
        enchant_dict_ce->serialize = zend_class_serialize_deny;
        enchant_dict_ce->unserialize = zend_class_unserialize_deny;
index dcd11cea38bb456ef45bb6780ffe702e911d87bb..feba5d88d7e0ccdb15c8258c13037912bfad240a 100644 (file)
@@ -1,11 +1,16 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
+/** @strict-properties */
 final class EnchantBroker
 {
 }
 
+/** @strict-properties */
 final class EnchantDictionary
 {
 }
index 34fa122b54fdb047d53537d8d203d1d62b07e15b..e0d020cc68a64cca64eb33d49fd499413ee7ecd4 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 31f7c4cd39e58d6474b90acd65f4b7bda7a6ddf3 */
+ * Stub hash: ec1ad38320dfec1e567b0f0062dbc032c425945c */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_enchant_broker_init, 0, 0, EnchantBroker, MAY_BE_FALSE)
 ZEND_END_ARG_INFO()
@@ -157,3 +157,26 @@ static const zend_function_entry class_EnchantBroker_methods[] = {
 static const zend_function_entry class_EnchantDictionary_methods[] = {
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_EnchantBroker()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "EnchantBroker", class_EnchantBroker_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_EnchantDictionary()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "EnchantDictionary", class_EnchantDictionary_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+
+       return class_entry;
+}
+
index 9a8afe8577f3d64915192e7a614ed85cc2df0561..b277a8daad934751b61c24f6ab7526ae1d33c8e2 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
 function exif_tagname(int $index): string|false {}
 
index 91dd8b0e61ab6cff43636ed1f103890f23fa548a..71593804083e9c4562ff0c8be0d8c268e02a27c3 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: ef23ff502ea9658af29e50d57366c281f7a7eb6c */
+ * Stub hash: 3dde1567a65ab31bd5722ea6d568050420f89439 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_tagname, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
@@ -37,3 +37,4 @@ static const zend_function_entry ext_functions[] = {
        ZEND_FE(exif_imagetype, arginfo_exif_imagetype)
        ZEND_FE_END
 };
+
index e18da8bf7a471e9d5e0d51d986a21db5a4bb4547..cc6e2a5440d12ad221d1b89fedaba23a64aef18f 100644 (file)
@@ -4880,22 +4880,15 @@ static int zend_ffi_preload(char *preload) /* {{{ */
 /* {{{ ZEND_MINIT_FUNCTION */
 ZEND_MINIT_FUNCTION(ffi)
 {
-       zend_class_entry ce;
-
        REGISTER_INI_ENTRIES();
 
        FFI_G(is_cli) = strcmp(sapi_module.name, "cli") == 0;
 
-       INIT_NS_CLASS_ENTRY(ce, "FFI", "Exception", NULL);
-       zend_ffi_exception_ce = zend_register_internal_class_ex(&ce, zend_ce_error);
+       zend_ffi_exception_ce = register_class_FFI_Exception(zend_ce_error);
 
-       INIT_NS_CLASS_ENTRY(ce, "FFI", "ParserException", NULL);
-       zend_ffi_parser_exception_ce = zend_register_internal_class_ex(&ce, zend_ffi_exception_ce);
-       zend_ffi_parser_exception_ce->ce_flags |= ZEND_ACC_FINAL;
+       zend_ffi_parser_exception_ce = register_class_FFI_ParserException(zend_ffi_exception_ce);
 
-       INIT_CLASS_ENTRY(ce, "FFI", class_FFI_methods);
-       zend_ffi_ce = zend_register_internal_class(&ce);
-       zend_ffi_ce->ce_flags |= ZEND_ACC_FINAL;
+       zend_ffi_ce = register_class_FFI();
        zend_ffi_ce->create_object = zend_ffi_new;
        zend_ffi_ce->serialize = zend_class_serialize_deny;
        zend_ffi_ce->unserialize = zend_class_unserialize_deny;
@@ -4930,9 +4923,7 @@ ZEND_MINIT_FUNCTION(ffi)
 
        zend_declare_class_constant_long(zend_ffi_ce, "__BIGGEST_ALIGNMENT__", sizeof("__BIGGEST_ALIGNMENT__")-1, __BIGGEST_ALIGNMENT__);
 
-       INIT_NS_CLASS_ENTRY(ce, "FFI", "CData", NULL);
-       zend_ffi_cdata_ce = zend_register_internal_class(&ce);
-       zend_ffi_cdata_ce->ce_flags |= ZEND_ACC_FINAL;
+       zend_ffi_cdata_ce = register_class_FFI_CData();
        zend_ffi_cdata_ce->create_object = zend_ffi_cdata_new;
        zend_ffi_cdata_ce->get_iterator = zend_ffi_cdata_get_iterator;
        zend_ffi_cdata_ce->serialize = zend_class_serialize_deny;
@@ -5008,9 +4999,7 @@ ZEND_MINIT_FUNCTION(ffi)
        zend_ffi_cdata_free_handlers.get_properties       = zend_fake_get_properties;
        zend_ffi_cdata_free_handlers.get_gc               = zend_fake_get_gc;
 
-       INIT_NS_CLASS_ENTRY(ce, "FFI", "CType", class_FFI_CType_methods);
-       zend_ffi_ctype_ce = zend_register_internal_class(&ce);
-       zend_ffi_ctype_ce->ce_flags |= ZEND_ACC_FINAL;
+       zend_ffi_ctype_ce = register_class_FFI_CType();
        zend_ffi_ctype_ce->create_object = zend_ffi_ctype_new;
        zend_ffi_ctype_ce->serialize = zend_class_serialize_deny;
        zend_ffi_ctype_ce->unserialize = zend_class_unserialize_deny;
index dba2dcc30810689b190a26d721ff21c7bb2e86e5..c86956c95f4a1532d5d6afd910554025f0f51471 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
 namespace {
 
@@ -68,8 +71,17 @@ final class FFI
 
 namespace FFI {
 
+final class CData {
+}
+
 final class CType {
     public function getName() : string {}
 }
 
+class Exception extends \Error {
+}
+
+final class ParserException extends Exception {
+}
+
 }
index d9e9dec3d07b44e4b179e7588182799f2a9f11ee..bb9850cfb3ae888b514583225fc41bb46b590cae 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 5aeec68fea7a94cd643464acfb10bf4cfcc863da */
+ * Stub hash: f8eb234b7efa2060f54ed300fc6fa697741b0ab6 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")
@@ -125,7 +125,77 @@ static const zend_function_entry class_FFI_methods[] = {
 };
 
 
+static const zend_function_entry class_FFI_CData_methods[] = {
+       ZEND_FE_END
+};
+
+
 static const zend_function_entry class_FFI_CType_methods[] = {
        ZEND_ME(FFI_CType, getName, arginfo_class_FFI_CType_getName, ZEND_ACC_PUBLIC)
        ZEND_FE_END
 };
+
+
+static const zend_function_entry class_FFI_Exception_methods[] = {
+       ZEND_FE_END
+};
+
+
+static const zend_function_entry class_FFI_ParserException_methods[] = {
+       ZEND_FE_END
+};
+
+zend_class_entry *register_class_FFI()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "FFI", class_FFI_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL;
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_FFI_CData()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_NS_CLASS_ENTRY(ce, "FFI", "CData", class_FFI_CData_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL;
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_FFI_CType()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_NS_CLASS_ENTRY(ce, "FFI", "CType", class_FFI_CType_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL;
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_FFI_Exception(zend_class_entry *class_entry_Error)
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_NS_CLASS_ENTRY(ce, "FFI", "Exception", class_FFI_Exception_methods);
+       class_entry = zend_register_internal_class_ex(&ce, class_entry_Error);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_FFI_ParserException(zend_class_entry *class_entry_FFI_Exception)
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_NS_CLASS_ENTRY(ce, "FFI", "ParserException", class_FFI_ParserException_methods);
+       class_entry = zend_register_internal_class_ex(&ce, class_entry_FFI_Exception);
+       class_entry->ce_flags |= ZEND_ACC_FINAL;
+
+       return class_entry;
+}
+
index 5670debe4a39d4d655c5eab72576bc21c2289a4e..cc272062822b235917c388d087d3911f14a1bf15 100644 (file)
@@ -107,9 +107,7 @@ PHP_FILEINFO_API zend_object *finfo_objects_new(zend_class_entry *class_type)
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(finfo)
 {
-       zend_class_entry _finfo_class_entry;
-       INIT_CLASS_ENTRY(_finfo_class_entry, "finfo", class_finfo_methods);
-       finfo_class_entry = zend_register_internal_class(&_finfo_class_entry);
+       finfo_class_entry = register_class_finfo();
        finfo_class_entry->create_object = finfo_objects_new;
        finfo_class_entry->serialize = zend_class_serialize_deny;
        finfo_class_entry->unserialize = zend_class_unserialize_deny;
index 5a498b79c1182c6d9c6ceb3ce9c0d11acb0d6faa..cb9e639b2f5d54239d435c4609492dd8cc9bf2e9 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
 class finfo
 {
index 3fe1f28a02ac0cf35fe35b17ea1ca3cc92556ed8..4921a546b5f6f8bf9ea77f6b637092e9ea69da73 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 1282a20b1d007bbcc9c0d4efe400db43a5450307 */
+ * Stub hash: ae5759febdd7ad434c8bf2e23e9da334ff9054dd */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_finfo_open, 0, 0, finfo, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
@@ -81,3 +81,14 @@ static const zend_function_entry class_finfo_methods[] = {
        ZEND_ME_MAPPING(set_flags, finfo_set_flags, arginfo_class_finfo_set_flags, ZEND_ACC_PUBLIC)
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_finfo()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "finfo", class_finfo_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
index de92b935192a71dc4e62af4384f32011ac5a1b13..652f5d143181fe35ef0e0ec7df8c65b2ea261f07 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
 function filter_has_var(int $input_type, string $var_name): bool {}
 
index c4e4479e792a9a298220e1f18183878fe607ddf3..f102c5902a4485af97ecd6873b5d937ba08046b9 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: b5f2e4a79eb6f30fe143b3086845435d0a0a6ef0 */
+ * Stub hash: dc73178b6c82437ae4eec49984613563018d3bde */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_has_var, 0, 2, _IS_BOOL, 0)
        ZEND_ARG_TYPE_INFO(0, input_type, IS_LONG, 0)
@@ -58,3 +58,4 @@ static const zend_function_entry ext_functions[] = {
        ZEND_FE(filter_id, arginfo_filter_id)
        ZEND_FE_END
 };
+
index 698cfe215c3ec8ceffedce14b00574a907b502ad..9bf3265e40a7c79a96d0209832e15fc6fa3e119b 100644 (file)
@@ -1,6 +1,14 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
+
+/** @strict-properties */
+final class FTPConnection
+{
+}
 
 function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTPConnection|false {}
 
index 30251b87ee3373e2908a85789f9faebcb8b245cc..39f0170ee602e9ac05d44e424cf740f49fbf412a 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 151310a13eeeb2bbf4df1ab38a3a29506b26a570 */
+ * Stub hash: d72294d567338c30f627b8247a8cc27148237e41 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ftp_connect, 0, 1, FTPConnection, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
@@ -274,3 +274,20 @@ static const zend_function_entry ext_functions[] = {
        ZEND_FE(ftp_get_option, arginfo_ftp_get_option)
        ZEND_FE_END
 };
+
+
+static const zend_function_entry class_FTPConnection_methods[] = {
+       ZEND_FE_END
+};
+
+zend_class_entry *register_class_FTPConnection()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "FTPConnection", class_FTPConnection_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+
+       return class_entry;
+}
+
index 2b944f04e6898af7395e8486db9ff65675533187..52d88fcf96b05d01b98b1247e1df7d70aa282bea 100644 (file)
@@ -97,8 +97,6 @@ static void ftp_object_destroy(zend_object *zobj) {
 
 PHP_MINIT_FUNCTION(ftp)
 {
-       zend_class_entry ce;
-
 #ifdef HAVE_FTP_SSL
 #if OPENSSL_VERSION_NUMBER < 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
        SSL_library_init();
@@ -110,9 +108,7 @@ PHP_MINIT_FUNCTION(ftp)
 #endif
 #endif
 
-       INIT_CLASS_ENTRY(ce, "FTPConnection", NULL);
-       php_ftp_ce = zend_register_internal_class(&ce);
-       php_ftp_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       php_ftp_ce = register_class_FTPConnection();
        php_ftp_ce->create_object = ftp_object_create;
        php_ftp_ce->serialize = zend_class_serialize_deny;
        php_ftp_ce->unserialize = zend_class_unserialize_deny;
index aecca33c8beb47a009e6986a05f660d008e8be07..8dfb201402a2134ccadc5b0b07035c7ef5baf938 100644 (file)
@@ -217,10 +217,7 @@ void php_gd_assign_libgdimageptr_as_extgdimage(zval *val, gdImagePtr image)
 
 static void php_gd_object_minit_helper()
 {
-       zend_class_entry ce;
-       INIT_CLASS_ENTRY(ce, "GdImage", class_GdImage_methods);
-       gd_image_ce = zend_register_internal_class(&ce);
-       gd_image_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       gd_image_ce = register_class_GdImage();
        gd_image_ce->create_object = php_gd_image_object_create;
        gd_image_ce->serialize = zend_class_serialize_deny;
        gd_image_ce->unserialize = zend_class_unserialize_deny;
@@ -287,10 +284,7 @@ static zend_function *php_gd_font_object_get_constructor(zend_object *object)
 
 static void php_gd_font_minit_helper()
 {
-       zend_class_entry ce;
-       INIT_CLASS_ENTRY(ce, "GdFont", class_GdFont_methods);
-       gd_font_ce = zend_register_internal_class(&ce);
-       gd_font_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       gd_font_ce = register_class_GdFont();
        gd_font_ce->create_object = php_gd_font_object_create;
        gd_font_ce->serialize = zend_class_serialize_deny;
        gd_font_ce->unserialize = zend_class_unserialize_deny;
index 0ef410fc1e9565b98cd5ede5074ac2de6acde92b..fdc56bc46773d6950130544e46f94121732d7694 100644 (file)
@@ -1,8 +1,13 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
+/** @strict-properties */
 final class GdImage {}
+/** @strict-properties */
 final class GdFont {}
 
 function gd_info(): array {}
index ea61b0837410a331a857a01c0d0ac16ba71339a8..01a79f9f2ac2a8e5261ce22a163d5d10af7b6b76 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 23b7c8395c628239fb10d746ca6bba72871ee9f3 */
+ * Stub hash: 174cec5de1eb55d1fe837648255ee56553cdad6e */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gd_info, 0, 0, IS_ARRAY, 0)
 ZEND_END_ARG_INFO()
@@ -836,3 +836,26 @@ static const zend_function_entry class_GdImage_methods[] = {
 static const zend_function_entry class_GdFont_methods[] = {
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_GdImage()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "GdImage", class_GdImage_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_GdFont()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "GdFont", class_GdFont_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+
+       return class_entry;
+}
+
index 84654ab741df3ef557b4b0062df39cce6d77ebd9..7a9716361ea5429ee5f2672d026adfbd2d24b05b 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
 function textdomain(?string $domain): string {}
 
index 32811d5b66b40b295cf23c235d39b63f95ce02d5..949a57e4accf1c744e8e3842187abb5467cabb9a 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 3fbd90b87dfcbc5a1a0a2aea8d0cc45516e221ce */
+ * Stub hash: 4a111861e8302c685ba08073dacf9f120307d89a */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_textdomain, 0, 1, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 1)
@@ -102,3 +102,4 @@ static const zend_function_entry ext_functions[] = {
 #endif
        ZEND_FE_END
 };
+
index 55567f5c6d547e136febc02c035120ebc6926e69..78c286cc8385be76176f920dfcb303cf2e3632e3 100644 (file)
@@ -527,9 +527,7 @@ static ZEND_GINIT_FUNCTION(gmp)
 /* {{{ ZEND_MINIT_FUNCTION */
 ZEND_MINIT_FUNCTION(gmp)
 {
-       zend_class_entry tmp_ce;
-       INIT_CLASS_ENTRY(tmp_ce, "GMP", class_GMP_methods);
-       gmp_ce = zend_register_internal_class(&tmp_ce);
+       gmp_ce = register_class_GMP();
        gmp_ce->create_object = gmp_create_object;
        gmp_ce->serialize = gmp_serialize;
        gmp_ce->unserialize = gmp_unserialize;
index 729ae37245aa6a300bed8d821a2448a55d2904fb..77dbfef5e1b64481ccf02d66d34c29596edfecf6 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
 class GMP
 {
index fd341edbb565d71df75d6b0fcb3e7b9bf4c82b6f..ed4b49caf3938bc7cf5b3ac65a681a3a2f5ee87f 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: a1eb4fd58c0b2155692611386c77035f1ef11c2c */
+ * Stub hash: 97664dc0e71160eacf28f604964df4e9bc97fde5 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_init, 0, 1, GMP, 0)
        ZEND_ARG_TYPE_MASK(0, num, MAY_BE_LONG|MAY_BE_STRING, NULL)
@@ -296,3 +296,14 @@ static const zend_function_entry ext_functions[] = {
 static const zend_function_entry class_GMP_methods[] = {
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_GMP()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "GMP", class_GMP_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
index 216f80687eb776c5c86c4db46ebb9391e781fb2f..bf1d1577ca532d827163b51f8192a8c558d1c59e 100644 (file)
@@ -1557,8 +1557,6 @@ PHP_METHOD(HashContext, __unserialize)
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(hash)
 {
-       zend_class_entry ce;
-
        zend_hash_init(&php_hash_hashtable, 35, NULL, NULL, 1);
 
        php_hash_register_algo("md2",                   &php_hash_md2_ops);
@@ -1627,9 +1625,7 @@ PHP_MINIT_FUNCTION(hash)
 
        REGISTER_LONG_CONSTANT("HASH_HMAC",             PHP_HASH_HMAC,  CONST_CS | CONST_PERSISTENT);
 
-       INIT_CLASS_ENTRY(ce, "HashContext", class_HashContext_methods);
-       php_hashcontext_ce = zend_register_internal_class(&ce);
-       php_hashcontext_ce->ce_flags |= ZEND_ACC_FINAL;
+       php_hashcontext_ce = register_class_HashContext();
        php_hashcontext_ce->create_object = php_hashcontext_create;
 
        memcpy(&php_hashcontext_handlers, &std_object_handlers,
index 7eb3925c353b4a34804508832dcd103c51b8e050..fe5516ad7e56e3a63fe4814d96500bbcd9acd302 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
 function hash(string $algo, string $data, bool $binary = false, array $options = []): string|false {}
 
index 1d654b546ee1f491257a75c104a14748a6c73165..0272f3fd9911a0ab1844e173d0f6feb5967473cb 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: e8466049fca2eae179adbc19bb67e71f6486ec4e */
+ * Stub hash: 58f4af6d45c5e69afd2bcee3207397654980f13e */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
@@ -204,3 +204,15 @@ static const zend_function_entry class_HashContext_methods[] = {
        ZEND_ME(HashContext, __unserialize, arginfo_class_HashContext___unserialize, ZEND_ACC_PUBLIC)
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_HashContext()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "HashContext", class_HashContext_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL;
+
+       return class_entry;
+}
+
index 84dc48a5e965f4c2a09b7298f56ce2f37144ba16..f0d39238ff794ce0587de474b93cb149ae0092ed 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
 function iconv_strlen(string $string, ?string $encoding = null): int|false {}
 
index 619d52631fb6d9293fe99c8da539d460330ead12..3a07b8a8ac6d24ec8f56e49bd607e3ce365549f3 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 5d05deb60466c6e1ee73b44ad0b09a032bc8410e */
+ * Stub hash: c301856deffe269e4bbf1554d9eba4d5cbbb20e8 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
@@ -85,3 +85,4 @@ static const zend_function_entry ext_functions[] = {
        ZEND_FE(iconv_get_encoding, arginfo_iconv_get_encoding)
        ZEND_FE_END
 };
+
index aa547da000cec49a4bb72e5d4162f7a4bc404379..e62d6f7b2aea7e06c4506770bde22ed357677593 100644 (file)
@@ -444,7 +444,6 @@ static PHP_GINIT_FUNCTION(imap)
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(imap)
 {
-       zend_class_entry ce;
        unsigned long sa_all =  SA_MESSAGES | SA_RECENT | SA_UNSEEN | SA_UIDNEXT | SA_UIDVALIDITY;
 
        REGISTER_INI_ENTRIES();
@@ -478,10 +477,7 @@ PHP_MINIT_FUNCTION(imap)
        ssl_onceonlyinit ();
 #endif
 
-
-       INIT_CLASS_ENTRY(ce, "IMAPConnection", class_IMAPConnection_methods);
-       php_imap_ce = zend_register_internal_class(&ce);
-       php_imap_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       php_imap_ce = register_class_IMAPConnection();
        php_imap_ce->create_object = imap_object_create;
        php_imap_ce->serialize = zend_class_serialize_deny;
        php_imap_ce->unserialize = zend_class_unserialize_deny;
index bd4b04a12142ec6218426959970c8f49591d7eef..18495683b97d56b5e168f4301f7f901884e3384f 100644 (file)
@@ -1,8 +1,12 @@
 <?php
 
-/** @generate-function-entries */
-final class IMAPConnection {
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
+/** @strict-properties */
+final class IMAPConnection {
 }
 
 function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []): IMAPConnection|false {}
index f7f999e3d6560984263badc737b819df0ba6763a..32e1e6987af9c3a1e7846c93549ba147383581d9 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 2b4a654a6a247e59e3213715ecee9c7b837b0249 */
+ * Stub hash: a1e3bdfdd48746db4743e1667d7ba53832160142 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_open, 0, 3, IMAPConnection, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
@@ -517,3 +517,15 @@ static const zend_function_entry ext_functions[] = {
 static const zend_function_entry class_IMAPConnection_methods[] = {
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_IMAPConnection()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "IMAPConnection", class_IMAPConnection_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+
+       return class_entry;
+}
+
index 872766239e0de0ab1aba331cd67713ab88f861d6..5315966f7d7372e1bcdf81a7f3996efeb2a5e950 100644 (file)
@@ -44,13 +44,9 @@ PHP_JSON_API ZEND_DECLARE_MODULE_GLOBALS(json)
 /* {{{ MINIT */
 static PHP_MINIT_FUNCTION(json)
 {
-       zend_class_entry ce;
+       php_json_serializable_ce = register_class_JsonSerializable();
 
-       INIT_CLASS_ENTRY(ce, "JsonSerializable", class_JsonSerializable_methods);
-       php_json_serializable_ce = zend_register_internal_interface(&ce);
-
-       INIT_CLASS_ENTRY(ce, "JsonException", NULL);
-       php_json_exception_ce = zend_register_internal_class_ex(&ce, zend_ce_exception);
+       php_json_exception_ce = register_class_JsonException(zend_ce_exception);
 
        /* options for json_encode */
        PHP_JSON_REGISTER_CONSTANT("JSON_HEX_TAG",  PHP_JSON_HEX_TAG);
index a9b5bbf511213f9cf0f1f8583e82c49347f47e50..bf64f49408e16917723b37810167b72efc314f91 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 
-/** @generate-function-entries */
+/**
+ * @generate-function-entries
+ * @generate-class-entries
+ */
 
 function json_encode(mixed $value, int $flags = 0, int $depth = 512): string|false {}
 
@@ -15,3 +18,7 @@ interface JsonSerializable
     /** @return mixed */
     public function jsonSerialize();
 }
+
+class JsonException extends Exception
+{
+}
index c4b20d701385654ef16c5f842a1480b85497a713..9cf5fad6ff33eea04b099766ab6e12377d67fe02 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 2d1e6c422221ec7efbbd540ee777a5ce2c639943 */
+ * Stub hash: bb9d306951484ce32054dff31dde37638f2841dc */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_json_encode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
@@ -43,3 +43,29 @@ static const zend_function_entry class_JsonSerializable_methods[] = {
        ZEND_ABSTRACT_ME_WITH_FLAGS(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
        ZEND_FE_END
 };
+
+
+static const zend_function_entry class_JsonException_methods[] = {
+       ZEND_FE_END
+};
+
+zend_class_entry *register_class_JsonSerializable()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "JsonSerializable", class_JsonSerializable_methods);
+       class_entry = zend_register_internal_interface(&ce);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_JsonException(zend_class_entry *class_entry_Exception)
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "JsonException", class_JsonException_methods);
+       class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception);
+
+       return class_entry;
+}
+