]> granicus.if.org Git - php/commitdiff
Generate class entries for snmp, soap, sockets, sodium, sqlite3, sysv*, tidy
authorMáté Kocsis <kocsismate@woohoolabs.com>
Mon, 15 Feb 2021 09:00:46 +0000 (10:00 +0100)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Mon, 15 Feb 2021 10:45:26 +0000 (11:45 +0100)
Closes GH-6696

29 files changed:
ext/skeleton/skeleton.stub.php
ext/skeleton/skeleton_arginfo.h
ext/snmp/snmp.c
ext/snmp/snmp.stub.php
ext/snmp/snmp_arginfo.h
ext/soap/soap.c
ext/soap/soap.stub.php
ext/soap/soap_arginfo.h
ext/sockets/sockets.c
ext/sockets/sockets.stub.php
ext/sockets/sockets_arginfo.h
ext/sodium/libsodium.c
ext/sodium/libsodium.stub.php
ext/sodium/libsodium_arginfo.h
ext/sqlite3/sqlite3.c
ext/sqlite3/sqlite3.stub.php
ext/sqlite3/sqlite3_arginfo.h
ext/sysvmsg/sysvmsg.c
ext/sysvmsg/sysvmsg.stub.php
ext/sysvmsg/sysvmsg_arginfo.h
ext/sysvsem/sysvsem.c
ext/sysvsem/sysvsem.stub.php
ext/sysvsem/sysvsem_arginfo.h
ext/sysvshm/sysvshm.c
ext/sysvshm/sysvshm.stub.php
ext/sysvshm/sysvshm_arginfo.h
ext/tidy/tidy.c
ext/tidy/tidy.stub.php
ext/tidy/tidy_arginfo.h

index 06740a0a78f913fbb12fa5e8022aa7dca48d27af..c7907faea164e3992cb6b0a4573e8d385de04715 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-/** @generate-function-entries */
+/** @generate-class-entries */
 
 function test1(): void {}
 
index 9157c66bfd7b84b8fbf797339f59b6fe35fd4e2a..8d1060c30c93a6ef0f2729ee4a99eb52dbaf6828 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 7eb3fd4083c98e6dffc8b02b6373b7ce9cbf228d */
+ * Stub hash: efdd79c2c8ccff694699c86fdd6248a13839c744 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test1, 0, 0, IS_VOID, 0)
 ZEND_END_ARG_INFO()
@@ -18,3 +18,4 @@ static const zend_function_entry ext_functions[] = {
        ZEND_FE(test2, arginfo_test2)
        ZEND_FE_END
 };
+
index 0f5142b28ec88f2c5ed5915701cf4807304a20d4..8674acaf215513b492d9429e6afff1bc1657d269 100644 (file)
@@ -1959,7 +1959,6 @@ const php_snmp_prop_handler php_snmp_property_entries[] = {
 PHP_MINIT_FUNCTION(snmp)
 {
        netsnmp_log_handler *logh;
-       zend_class_entry ce, cex;
 
        init_snmp("snmpapp");
        /* net-snmp corrupts the CTYPE locale during initialization. */
@@ -1985,12 +1984,11 @@ PHP_MINIT_FUNCTION(snmp)
        php_snmp_object_handlers.get_gc = php_snmp_get_gc;
 
        /* Register SNMP Class */
-       INIT_CLASS_ENTRY(ce, "SNMP", class_SNMP_methods);
-       ce.create_object = php_snmp_object_new;
+       php_snmp_ce = register_class_SNMP();
+       php_snmp_ce->create_object = php_snmp_object_new;
        php_snmp_object_handlers.offset = XtOffsetOf(php_snmp_object, zo);
        php_snmp_object_handlers.clone_obj = NULL;
        php_snmp_object_handlers.free_obj = php_snmp_object_free_storage;
-       php_snmp_ce = zend_register_internal_class(&ce);
 
        /* Register SNMP Class properties */
        zend_hash_init(&php_snmp_properties, 0, NULL, free_php_snmp_properties, 1);
@@ -2035,8 +2033,7 @@ PHP_MINIT_FUNCTION(snmp)
        REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_MULTIPLE_SET_QUERIES",    PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES);
 
        /* Register SNMPException class */
-       INIT_CLASS_ENTRY(cex, "SNMPException", NULL);
-       php_snmp_exception_ce = zend_register_internal_class_ex(&cex, spl_ce_RuntimeException);
+       php_snmp_exception_ce = register_class_SNMPException(spl_ce_RuntimeException);
 
        return SUCCESS;
 }
index e6e0cb22eb1d849a8ab6a4109be96e37bd294ec0..1378f34ff9989459937f1c0f299ed331871da735 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-/** @generate-function-entries */
+/** @generate-class-entries */
 
 function snmpget(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): stdClass|array|string|bool {}
 
index 52e7e7040da97661465b8ae27b368d899344c89d..ab87cc71d666b17e8cc449f653098ffe91a9a595 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 32433e63feea7cc46737000498e248da713ab5a3 */
+ * Stub hash: 08192d87d2ac5d35092cfcf4a2cdcc50f7ec4ada */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_snmpget, 0, 3, stdClass, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_BOOL)
        ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
@@ -241,3 +241,24 @@ static const zend_function_entry class_SNMP_methods[] = {
 static const zend_function_entry class_SNMPException_methods[] = {
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_SNMP()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SNMP", class_SNMP_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_SNMPException(zend_class_entry *class_entry_RuntimeException)
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SNMPException", class_SNMPException_methods);
+       class_entry = zend_register_internal_class_ex(&ce, class_entry_RuntimeException);
+
+       return class_entry;
+}
+
index 6466b157ce81dc63b2629530781095eb9685395a..49815082a83b53ba6e82efb6f6a7ed2a78067b87 100644 (file)
@@ -166,13 +166,6 @@ ZEND_DECLARE_MODULE_GLOBALS(soap)
 
 static void (*old_error_handler)(int, const char *, const uint32_t, zend_string *);
 
-#define PHP_SOAP_SERVER_CLASSNAME "SoapServer"
-#define PHP_SOAP_CLIENT_CLASSNAME "SoapClient"
-#define PHP_SOAP_VAR_CLASSNAME    "SoapVar"
-#define PHP_SOAP_FAULT_CLASSNAME  "SoapFault"
-#define PHP_SOAP_PARAM_CLASSNAME  "SoapParam"
-#define PHP_SOAP_HEADER_CLASSNAME "SoapHeader"
-
 PHP_RINIT_FUNCTION(soap);
 PHP_MINIT_FUNCTION(soap);
 PHP_MSHUTDOWN_FUNCTION(soap);
@@ -361,39 +354,27 @@ static void delete_hashtable_res(zend_resource *res)
 
 PHP_MINIT_FUNCTION(soap)
 {
-       zend_class_entry ce;
-
        /* TODO: add ini entry for always use soap errors */
        php_soap_prepare_globals();
        ZEND_INIT_MODULE_GLOBALS(soap, php_soap_init_globals, NULL);
        REGISTER_INI_ENTRIES();
 
        /* Register SoapClient class */
-       /* BIG NOTE : THIS EMITS AN COMPILATION WARNING UNDER ZE2 - handle_function_call deprecated.
-               soap_call_function_handler should be of type zend_function, not (*handle_function_call).
-       */
-       {
-               INIT_CLASS_ENTRY(ce, PHP_SOAP_CLIENT_CLASSNAME, class_SoapClient_methods);
-               soap_class_entry = zend_register_internal_class(&ce);
-       }
+       soap_class_entry = register_class_SoapClient();
+
        /* Register SoapVar class */
-       INIT_CLASS_ENTRY(ce, PHP_SOAP_VAR_CLASSNAME, class_SoapVar_methods);
-       soap_var_class_entry = zend_register_internal_class(&ce);
+       soap_var_class_entry = register_class_SoapVar();
 
        /* Register SoapServer class */
-       INIT_CLASS_ENTRY(ce, PHP_SOAP_SERVER_CLASSNAME, class_SoapServer_methods);
-       soap_server_class_entry = zend_register_internal_class(&ce);
+       soap_server_class_entry = register_class_SoapServer();
 
        /* Register SoapFault class */
-       INIT_CLASS_ENTRY(ce, PHP_SOAP_FAULT_CLASSNAME, class_SoapFault_methods);
-       soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_ce_exception);
+       soap_fault_class_entry = register_class_SoapFault(zend_ce_exception);
 
        /* Register SoapParam class */
-       INIT_CLASS_ENTRY(ce, PHP_SOAP_PARAM_CLASSNAME, class_SoapParam_methods);
-       soap_param_class_entry = zend_register_internal_class(&ce);
+       soap_param_class_entry = register_class_SoapParam();
 
-       INIT_CLASS_ENTRY(ce, PHP_SOAP_HEADER_CLASSNAME, class_SoapHeader_methods);
-       soap_header_class_entry = zend_register_internal_class(&ce);
+       soap_header_class_entry = register_class_SoapHeader();
 
        le_sdl = zend_register_list_destructors_ex(delete_sdl_res, NULL, "SOAP SDL", module_number);
        le_url = zend_register_list_destructors_ex(delete_url_res, NULL, "SOAP URL", module_number);
index 01e41b7e8792f2d566e7444f3a03a8bfe4c0ed93..1e92dca751190c05789e08ca2c1f362abe582a34 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-/** @generate-function-entries */
+/** @generate-class-entries */
 
 function use_soap_error_handler(bool $enable = true): bool {}
 
index da80ca6fdfe0eef1d1ab1a6ac446fdd6b51c74b9..06dce3c891c012bead9f755330e62797f3d166db 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: c0d32b2d8f3c39203b437a01dc79cd4e934dc9f7 */
+ * Stub hash: b4f2354707bc7b992a3574f820edb329b16dd49e */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_use_soap_error_handler, 0, 0, _IS_BOOL, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 0, "true")
@@ -230,3 +230,64 @@ static const zend_function_entry class_SoapClient_methods[] = {
        ZEND_ME(SoapClient, __setLocation, arginfo_class_SoapClient___setLocation, ZEND_ACC_PUBLIC)
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_SoapParam()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SoapParam", class_SoapParam_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_SoapHeader()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SoapHeader", class_SoapHeader_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_SoapFault(zend_class_entry *class_entry_Exception)
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SoapFault", class_SoapFault_methods);
+       class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_SoapVar()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SoapVar", class_SoapVar_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_SoapServer()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SoapServer", class_SoapServer_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_SoapClient()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SoapClient", class_SoapClient_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
index 4675615973ab4ae40f8210c1ab1423edb43f9daf..204fa98a47b924a6ff4914a96907ae83f86e72da 100644 (file)
@@ -432,10 +432,7 @@ static PHP_MINIT_FUNCTION(sockets)
        ZEND_TSRMLS_CACHE_UPDATE();
 #endif
 
-       zend_class_entry ce_socket;
-       INIT_CLASS_ENTRY(ce_socket, "Socket", class_Socket_methods);
-       socket_ce = zend_register_internal_class(&ce_socket);
-       socket_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       socket_ce = register_class_Socket();
        socket_ce->create_object = socket_create_object;
        socket_ce->serialize = zend_class_serialize_deny;
        socket_ce->unserialize = zend_class_unserialize_deny;
@@ -447,10 +444,7 @@ static PHP_MINIT_FUNCTION(sockets)
        socket_object_handlers.clone_obj = NULL;
        socket_object_handlers.get_gc = socket_get_gc;
 
-       zend_class_entry ce_address_info;
-       INIT_CLASS_ENTRY(ce_address_info, "AddressInfo", class_AddressInfo_methods);
-       address_info_ce = zend_register_internal_class(&ce_address_info);
-       address_info_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       address_info_ce = register_class_AddressInfo();
        address_info_ce->create_object = address_info_create_object;
        address_info_ce->serialize = zend_class_serialize_deny;
        address_info_ce->unserialize = zend_class_unserialize_deny;
index b345163bc75bd8905f67b56deece8e76d2dcdab6..967041e98e572b9acf0e0e1ea5bc05007ea9147f 100644 (file)
@@ -1,11 +1,13 @@
 <?php
 
-/** @generate-function-entries */
+/** @generate-class-entries */
 
+/** @strict-properties */
 final class Socket
 {
 }
 
+/** @strict-properties */
 final class AddressInfo
 {
 }
index 343c19a563f6cb08ec63f2826c9459ef5cc77a4f..6985fc1f8a5a7fe37c45e94dfac82df4d3c53141 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 90c3c470833947859433a2668d328fddfff94ae9 */
+ * Stub hash: aed25e8e90959fde6a454cf3b8d648feaf0ebad7 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1)
@@ -321,3 +321,26 @@ static const zend_function_entry class_Socket_methods[] = {
 static const zend_function_entry class_AddressInfo_methods[] = {
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_Socket()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "Socket", class_Socket_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_AddressInfo()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "AddressInfo", class_AddressInfo_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 bbe88ba206c120133e30a14156f7f3b09fc24456..7cdae32468ee78cbcabf69b2e2a19f4a8de8af19 100644 (file)
@@ -129,14 +129,11 @@ static void sodium_separate_string(zval *zv) {
 
 PHP_MINIT_FUNCTION(sodium)
 {
-       zend_class_entry ce;
-
        if (sodium_init() < 0) {
                zend_error(E_ERROR, "sodium_init()");
        }
 
-       INIT_CLASS_ENTRY(ce, "SodiumException", NULL);
-       sodium_exception_ce = zend_register_internal_class_ex(&ce, zend_ce_exception);
+       sodium_exception_ce = register_class_SodiumException(zend_ce_exception);
        sodium_exception_ce->create_object = sodium_exception_create_object;
 
        REGISTER_STRING_CONSTANT("SODIUM_LIBRARY_VERSION",
index e8f7b54ca2947cbb04c6a129c1405dbdd8b9163c..a4029d04d09b7cb8c0c957515fa7bccc03076065 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-/** @generate-function-entries */
+/** @generate-class-entries */
 
 function sodium_crypto_aead_aes256gcm_is_available(): bool {}
 
index 07b78aba74ca6af3cbc30796318c06bc23ceaa4a..aee45a5e6e7a26b7086793141ba6bc77d8c46d8a 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: b34401e98646f1e85a8dd292477cac68c6e4ac97 */
+ * Stub hash: 457c4c5a0243f815d859bdc9728709b4a8dc84d7 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_is_available, 0, 0, _IS_BOOL, 0)
 ZEND_END_ARG_INFO()
@@ -666,3 +666,14 @@ static const zend_function_entry ext_functions[] = {
 static const zend_function_entry class_SodiumException_methods[] = {
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_SodiumException(zend_class_entry *class_entry_Exception)
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SodiumException", class_SodiumException_methods);
+       class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception);
+
+       return class_entry;
+}
+
index cfd0cb7eae7178ceafe321e48235c5999e51490d..1db9841252b1527d54082a37af130f22a624359c 100644 (file)
@@ -2332,8 +2332,6 @@ static void sqlite3_param_dtor(zval *data) /* {{{ */
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(sqlite3)
 {
-       zend_class_entry ce;
-
 #ifdef ZTS
        /* Refuse to load if this wasn't a threasafe library loaded */
        if (!sqlite3_threadsafe()) {
@@ -2347,32 +2345,29 @@ PHP_MINIT_FUNCTION(sqlite3)
        memcpy(&sqlite3_result_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
 
        /* Register SQLite 3 Class */
-       INIT_CLASS_ENTRY(ce, "SQLite3", class_SQLite3_methods);
-       ce.create_object = php_sqlite3_object_new;
        sqlite3_object_handlers.offset = XtOffsetOf(php_sqlite3_db_object, zo);
        sqlite3_object_handlers.clone_obj = NULL;
        sqlite3_object_handlers.free_obj = php_sqlite3_object_free_storage;
-       php_sqlite3_sc_entry = zend_register_internal_class(&ce);
+       php_sqlite3_sc_entry = register_class_SQLite3();
+       php_sqlite3_sc_entry->create_object = php_sqlite3_object_new;
        php_sqlite3_sc_entry->serialize = zend_class_serialize_deny;
        php_sqlite3_sc_entry->unserialize = zend_class_unserialize_deny;
 
        /* Register SQLite 3 Prepared Statement Class */
-       INIT_CLASS_ENTRY(ce, "SQLite3Stmt", class_SQLite3Stmt_methods);
-       ce.create_object = php_sqlite3_stmt_object_new;
        sqlite3_stmt_object_handlers.offset = XtOffsetOf(php_sqlite3_stmt, zo);
        sqlite3_stmt_object_handlers.clone_obj = NULL;
        sqlite3_stmt_object_handlers.free_obj = php_sqlite3_stmt_object_free_storage;
-       php_sqlite3_stmt_entry = zend_register_internal_class(&ce);
+       php_sqlite3_stmt_entry = register_class_SQLite3Stmt();
+       php_sqlite3_stmt_entry->create_object = php_sqlite3_stmt_object_new;
        php_sqlite3_stmt_entry->serialize = zend_class_serialize_deny;
        php_sqlite3_stmt_entry->unserialize = zend_class_unserialize_deny;
 
        /* Register SQLite 3 Result Class */
-       INIT_CLASS_ENTRY(ce, "SQLite3Result", class_SQLite3Result_methods);
-       ce.create_object = php_sqlite3_result_object_new;
        sqlite3_result_object_handlers.offset = XtOffsetOf(php_sqlite3_result, zo);
        sqlite3_result_object_handlers.clone_obj = NULL;
        sqlite3_result_object_handlers.free_obj = php_sqlite3_result_object_free_storage;
-       php_sqlite3_result_entry = zend_register_internal_class(&ce);
+       php_sqlite3_result_entry = register_class_SQLite3Result();
+       php_sqlite3_result_entry->create_object = php_sqlite3_result_object_new;
        php_sqlite3_result_entry->serialize = zend_class_serialize_deny;
        php_sqlite3_result_entry->unserialize = zend_class_unserialize_deny;
 
index b4d4fdce297ff622fec98f44bf7f2b1ae2f0c0d1..37776aea6613866dc0960fd918637ce1701c5b8d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-/** @generate-function-entries */
+/** @generate-class-entries */
 
 class SQLite3
 {
index 8f95c54d8fc9d618f7543b950e1c65cd507058cf..480f18a860b69b88a73942572d4dcc7f52431dd2 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 2abe77016e7a595f1687be34e52bba6aa477e7ae */
+ * Stub hash: edb21146ffbfccc998f922f9e6967738134b8b07 */
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3___construct, 0, 0, 1)
        ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -254,3 +254,34 @@ static const zend_function_entry class_SQLite3Result_methods[] = {
        ZEND_ME(SQLite3Result, finalize, arginfo_class_SQLite3Result_finalize, ZEND_ACC_PUBLIC)
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_SQLite3()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SQLite3", class_SQLite3_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_SQLite3Stmt()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SQLite3Stmt", class_SQLite3Stmt_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_SQLite3Result()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SQLite3Result", class_SQLite3Result_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
index 8f24d7e0173b42ce9fc5e1caa507f4772062efa2..c9764726d40abb75cd6f4db7ad3d3b2f4edb788a 100644 (file)
@@ -108,10 +108,7 @@ static void sysvmsg_queue_free_obj(zend_object *object)
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(sysvmsg)
 {
-       zend_class_entry ce;
-       INIT_CLASS_ENTRY(ce, "SysvMessageQueue", class_SysvMessageQueue_methods);
-       sysvmsg_queue_ce = zend_register_internal_class(&ce);
-       sysvmsg_queue_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       sysvmsg_queue_ce = register_class_SysvMessageQueue();
        sysvmsg_queue_ce->create_object = sysvmsg_queue_create_object;
        sysvmsg_queue_ce->serialize = zend_class_serialize_deny;
        sysvmsg_queue_ce->unserialize = zend_class_unserialize_deny;
index 2a0c9cdc954368f67f77f2b4edd8e855244be1e1..5ec72a483726df38699ed2644df855b13469190f 100644 (file)
@@ -1,7 +1,8 @@
 <?php
 
-/** @generate-function-entries */
+/** @generate-class-entries */
 
+/** @strict-properties */
 final class SysvMessageQueue
 {
 }
index 804f1768b300d7f981175d475debb9df146fc83b..4759718b66ab91f8fbeb63b3d7d15a1e0bf7429a 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 3f918caddccfebee1f1048abd4a23672724436ad */
+ * Stub hash: 6744b81ba4b0b5db62ffe04255c35519e17be7c2 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_msg_get_queue, 0, 1, SysvMessageQueue, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
@@ -68,3 +68,15 @@ static const zend_function_entry ext_functions[] = {
 static const zend_function_entry class_SysvMessageQueue_methods[] = {
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_SysvMessageQueue()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SysvMessageQueue", class_SysvMessageQueue_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 46116e212efc71bffc9c5613cab72a49a3c47491..7009ad0facbd69e8505dc474afccdda545e5f85a 100644 (file)
@@ -151,10 +151,7 @@ static void sysvsem_free_obj(zend_object *object)
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(sysvsem)
 {
-       zend_class_entry ce;
-       INIT_CLASS_ENTRY(ce, "SysvSemaphore", class_SysvSemaphore_methods);
-       sysvsem_ce = zend_register_internal_class(&ce);
-       sysvsem_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       sysvsem_ce = register_class_SysvSemaphore();
        sysvsem_ce->create_object = sysvsem_create_object;
        sysvsem_ce->serialize = zend_class_serialize_deny;
        sysvsem_ce->unserialize = zend_class_unserialize_deny;
index 8da71b09fb781be22fe00819328b0acc8fd8e81a..40cb9b5d3eeb226bc7679380329161be996c7eec 100644 (file)
@@ -1,7 +1,8 @@
 <?php
 
-/** @generate-function-entries */
+/** @generate-class-entries */
 
+/** @strict-properties */
 final class SysvSemaphore
 {
 }
index 8d6f0ac4094f5974707c90e293f8a020f1496ae7..a4080bef5b79fcd7e19c43753775965230c35183 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 745e7cf135c7d1c9ad09d1ea1ab6cf2a8181433a */
+ * Stub hash: dd7be82f586ef5f9221268ae90e959e8cccdcacf */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_sem_get, 0, 1, SysvSemaphore, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
@@ -38,3 +38,15 @@ static const zend_function_entry ext_functions[] = {
 static const zend_function_entry class_SysvSemaphore_methods[] = {
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_SysvSemaphore()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SysvSemaphore", class_SysvSemaphore_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 96b437b41944d7fbe11cd67f1988bf6443a0b4d0..9ababdb8fe6fdef5478a2b61cfdca8e6bd0a8d00 100644 (file)
@@ -99,10 +99,7 @@ static int php_remove_shm_data(sysvshm_chunk_head *ptr, zend_long shm_varpos);
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(sysvshm)
 {
-       zend_class_entry ce;
-       INIT_CLASS_ENTRY(ce, "SysvSharedMemory", class_SysvSharedMemory_methods);
-       sysvshm_ce = zend_register_internal_class(&ce);
-       sysvshm_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
+       sysvshm_ce = register_class_SysvSharedMemory();
        sysvshm_ce->create_object = sysvshm_create_object;
        sysvshm_ce->serialize = zend_class_serialize_deny;
        sysvshm_ce->unserialize = zend_class_unserialize_deny;
index 4f2799a349ec0f7be018f49bc1d2bd4620ffe2ae..d874435b0621a9b718d4a6b2987b9b90e8b3b8ac 100644 (file)
@@ -1,7 +1,8 @@
 <?php
 
-/** @generate-function-entries */
+/** @generate-class-entries */
 
+/** @strict-properties */
 final class SysvSharedMemory
 {
 }
index d6f09d1426561afa6cf538bb47d67edc59c90d71..44a3f6c569e34d7431594dd8f600573eb2eef7e8 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 12f78387e5b7c436b608dbecc4c6b3eec82b6db1 */
+ * Stub hash: 033437611b589798fe9771e6dd2e95d2fbc999d4 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_shm_attach, 0, 1, SysvSharedMemory, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
@@ -56,3 +56,15 @@ static const zend_function_entry ext_functions[] = {
 static const zend_function_entry class_SysvSharedMemory_methods[] = {
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_SysvSharedMemory()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "SysvSharedMemory", class_SysvSharedMemory_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 ad2059c4e020fb9168f8d349c5c406c00f3ed505..561ece618b75a20a791f33e46c53c6ea8e0c4f26 100644 (file)
                } \
        }
 
-#define REGISTER_TIDY_CLASS(classname, name, parent, __flags) \
-       { \
-               zend_class_entry ce; \
-               INIT_CLASS_ENTRY(ce, # classname, class_ ## classname ## _methods); \
-               ce.create_object = tidy_object_new_ ## name; \
-               tidy_ce_ ## name = zend_register_internal_class_ex(&ce, parent); \
-               tidy_ce_ ## name->ce_flags |= __flags;  \
-               memcpy(&tidy_object_handlers_ ## name, &std_object_handlers, sizeof(zend_object_handlers)); \
-               tidy_object_handlers_ ## name.clone_obj = NULL; \
-       }
 
 #define TIDY_TAG_CONST(tag) REGISTER_LONG_CONSTANT("TIDY_TAG_" #tag, TidyTag_##tag, CONST_CS | CONST_PERSISTENT)
 #define TIDY_NODE_CONST(name, type) REGISTER_LONG_CONSTANT("TIDY_NODETYPE_" #name, TidyNode_##type, CONST_CS | CONST_PERSISTENT)
@@ -826,8 +816,16 @@ static PHP_MINIT_FUNCTION(tidy)
        tidySetPanicCall(php_tidy_panic);
 
        REGISTER_INI_ENTRIES();
-       REGISTER_TIDY_CLASS(tidy, doc,  NULL, 0);
-       REGISTER_TIDY_CLASS(tidyNode, node,     NULL, ZEND_ACC_FINAL);
+
+       tidy_ce_doc = register_class_tidy();
+       tidy_ce_doc->create_object = tidy_object_new_doc;
+       memcpy(&tidy_object_handlers_doc, &std_object_handlers, sizeof(zend_object_handlers));
+       tidy_object_handlers_doc.clone_obj = NULL;
+
+       tidy_ce_node = register_class_tidyNode();
+       tidy_ce_node->create_object = tidy_object_new_node;
+       memcpy(&tidy_object_handlers_node, &std_object_handlers, sizeof(zend_object_handlers));
+       tidy_object_handlers_node.clone_obj = NULL;
 
        tidy_object_handlers_doc.cast_object = tidy_doc_cast_handler;
        tidy_object_handlers_node.cast_object = tidy_node_cast_handler;
index 4030fa954d72aaa9c00f3813c6c0280f28c69f7e..74867f6cd70defeb3301391eb17460aa44521441 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-/** @generate-function-entries */
+/** @generate-class-entries */
 
 function tidy_parse_string(string $string, array|string|null $config = null, ?string $encoding = null): tidy|false {}
 
index 45f824865bc59a77314102d81c00992216afca99..f63cdac4a59c38b57cfb7d6160e042648a07a5bd 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: c4bbc901ca156da7cf0cbcc3c4019c7d3886959f */
+ * Stub hash: 75995fe0aad02540f1bde99495a188ae4ab7c0ac */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_tidy_parse_string, 0, 1, tidy, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
@@ -281,3 +281,25 @@ static const zend_function_entry class_tidyNode_methods[] = {
        ZEND_ME(tidyNode, getParent, arginfo_class_tidyNode_getParent, ZEND_ACC_PUBLIC)
        ZEND_FE_END
 };
+
+zend_class_entry *register_class_tidy()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "tidy", class_tidy_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+       return class_entry;
+}
+
+zend_class_entry *register_class_tidyNode()
+{
+       zend_class_entry ce, *class_entry;
+
+       INIT_CLASS_ENTRY(ce, "tidyNode", class_tidyNode_methods);
+       class_entry = zend_register_internal_class_ex(&ce, NULL);
+       class_entry->ce_flags |= ZEND_ACC_FINAL;
+
+       return class_entry;
+}
+