diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2021-02-14 15:21:24 +0100 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2021-02-15 00:11:22 +0100 |
commit | 5b5bfd6be48de4601d508fa5b8a7a572dda6b8bc (patch) | |
tree | 1750beb0dc141c3362e14f2105c2401319eddd68 | |
parent | af56982a5ecd28291d18d2e091515ad25de1050e (diff) | |
download | php-git-5b5bfd6be48de4601d508fa5b8a7a572dda6b8bc.tar.gz |
Generate class entries from stubs for phar, posix, pspell, readline, reflection, session, shmop
Closes GH-6692
-rw-r--r-- | ext/phar/phar_object.c | 18 | ||||
-rw-r--r-- | ext/phar/phar_object.stub.php | 2 | ||||
-rw-r--r-- | ext/phar/phar_object_arginfo.h | 45 | ||||
-rw-r--r-- | ext/posix/posix.stub.php | 2 | ||||
-rw-r--r-- | ext/posix/posix_arginfo.h | 3 | ||||
-rw-r--r-- | ext/pspell/pspell.c | 9 | ||||
-rw-r--r-- | ext/pspell/pspell.stub.php | 4 | ||||
-rw-r--r-- | ext/pspell/pspell_arginfo.h | 25 | ||||
-rw-r--r-- | ext/readline/readline.stub.php | 2 | ||||
-rw-r--r-- | ext/readline/readline_arginfo.h | 3 | ||||
-rw-r--r-- | ext/reflection/php_reflection.c | 132 | ||||
-rw-r--r-- | ext/reflection/php_reflection.stub.php | 32 | ||||
-rw-r--r-- | ext/reflection/php_reflection_arginfo.h | 267 | ||||
-rw-r--r-- | ext/session/php_session.h | 4 | ||||
-rw-r--r-- | ext/session/session.c | 19 | ||||
-rw-r--r-- | ext/session/session.stub.php | 2 | ||||
-rw-r--r-- | ext/session/session_arginfo.h | 44 | ||||
-rw-r--r-- | ext/shmop/shmop.c | 5 | ||||
-rw-r--r-- | ext/shmop/shmop.stub.php | 3 | ||||
-rw-r--r-- | ext/shmop/shmop_arginfo.h | 14 |
20 files changed, 488 insertions, 147 deletions
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 5ecf7a2ba9..07c5abd198 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -5074,23 +5074,13 @@ PHP_METHOD(PharFileInfo, decompress) void phar_object_init(void) /* {{{ */ { - zend_class_entry ce; + phar_ce_PharException = register_class_PharException(zend_ce_exception); - INIT_CLASS_ENTRY(ce, "PharException", class_PharException_methods); - phar_ce_PharException = zend_register_internal_class_ex(&ce, zend_ce_exception); + phar_ce_archive = register_class_Phar(spl_ce_RecursiveDirectoryIterator, zend_ce_countable, zend_ce_arrayaccess); - INIT_CLASS_ENTRY(ce, "Phar", class_Phar_methods); - phar_ce_archive = zend_register_internal_class_ex(&ce, spl_ce_RecursiveDirectoryIterator); + phar_ce_data = register_class_PharData(spl_ce_RecursiveDirectoryIterator, zend_ce_countable, zend_ce_arrayaccess); - zend_class_implements(phar_ce_archive, 2, zend_ce_countable, zend_ce_arrayaccess); - - INIT_CLASS_ENTRY(ce, "PharData", class_PharData_methods); - phar_ce_data = zend_register_internal_class_ex(&ce, spl_ce_RecursiveDirectoryIterator); - - zend_class_implements(phar_ce_data, 2, zend_ce_countable, zend_ce_arrayaccess); - - INIT_CLASS_ENTRY(ce, "PharFileInfo", class_PharFileInfo_methods); - phar_ce_entry = zend_register_internal_class_ex(&ce, spl_ce_SplFileInfo); + phar_ce_entry = register_class_PharFileInfo(spl_ce_SplFileInfo); REGISTER_PHAR_CLASS_CONST_LONG(phar_ce_archive, "BZ2", PHAR_ENT_COMPRESSED_BZ2) REGISTER_PHAR_CLASS_CONST_LONG(phar_ce_archive, "GZ", PHAR_ENT_COMPRESSED_GZ) diff --git a/ext/phar/phar_object.stub.php b/ext/phar/phar_object.stub.php index b8e428028e..2e2a83a352 100644 --- a/ext/phar/phar_object.stub.php +++ b/ext/phar/phar_object.stub.php @@ -1,6 +1,6 @@ <?php -/** @generate-function-entries */ +/** @generate-class-entries */ class PharException extends Exception { diff --git a/ext/phar/phar_object_arginfo.h b/ext/phar/phar_object_arginfo.h index 3858271c8e..cd9c829a27 100644 --- a/ext/phar/phar_object_arginfo.h +++ b/ext/phar/phar_object_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: bad833e724b1ebface8e8331310ecf7c32a52898 */ + * Stub hash: 8f6974078c7b16fd452a34a9e1b5c509699a2037 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -581,3 +581,46 @@ static const zend_function_entry class_PharFileInfo_methods[] = { ZEND_ME(PharFileInfo, setMetadata, arginfo_class_PharFileInfo_setMetadata, ZEND_ACC_PUBLIC) ZEND_FE_END }; + +zend_class_entry *register_class_PharException(zend_class_entry *class_entry_Exception) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "PharException", class_PharException_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception); + + return class_entry; +} + +zend_class_entry *register_class_Phar(zend_class_entry *class_entry_RecursiveDirectoryIterator, zend_class_entry *class_entry_Countable, zend_class_entry *class_entry_ArrayAccess) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "Phar", class_Phar_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_RecursiveDirectoryIterator); + zend_class_implements(class_entry, 2, class_entry_Countable, class_entry_ArrayAccess); + + return class_entry; +} + +zend_class_entry *register_class_PharData(zend_class_entry *class_entry_RecursiveDirectoryIterator, zend_class_entry *class_entry_Countable, zend_class_entry *class_entry_ArrayAccess) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "PharData", class_PharData_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_RecursiveDirectoryIterator); + zend_class_implements(class_entry, 2, class_entry_Countable, class_entry_ArrayAccess); + + return class_entry; +} + +zend_class_entry *register_class_PharFileInfo(zend_class_entry *class_entry_SplFileInfo) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "PharFileInfo", class_PharFileInfo_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_SplFileInfo); + + return class_entry; +} + diff --git a/ext/posix/posix.stub.php b/ext/posix/posix.stub.php index a509d9460f..a15a3a5dc5 100644 --- a/ext/posix/posix.stub.php +++ b/ext/posix/posix.stub.php @@ -1,6 +1,6 @@ <?php -/** @generate-function-entries */ +/** @generate-class-entries */ function posix_kill(int $process_id, int $signal): bool {} diff --git a/ext/posix/posix_arginfo.h b/ext/posix/posix_arginfo.h index 1d7b90f364..37838b4e97 100644 --- a/ext/posix/posix_arginfo.h +++ b/ext/posix/posix_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 6d1383a6f98104498b466ce5d9dcf5721760e8b7 */ + * Stub hash: 954c403785617dade95048b4345a34d4ec5d91c3 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_kill, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0) @@ -290,3 +290,4 @@ static const zend_function_entry ext_functions[] = { #endif ZEND_FE_END }; + diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index 8975519955..b965a22f61 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -150,10 +150,7 @@ static void php_pspell_config_object_free(zend_object *zobj) { /* {{{ PHP_MINIT_FUNCTION */ static PHP_MINIT_FUNCTION(pspell) { - zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "PSpell", class_PSpell_methods); - php_pspell_ce = zend_register_internal_class(&ce); - php_pspell_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES; + php_pspell_ce = register_class_PSpell(); php_pspell_ce->create_object = php_pspell_object_create; php_pspell_ce->serialize = zend_class_serialize_deny; php_pspell_ce->unserialize = zend_class_unserialize_deny; @@ -164,9 +161,7 @@ static PHP_MINIT_FUNCTION(pspell) php_pspell_handlers.get_constructor = php_pspell_object_get_constructor; php_pspell_handlers.offset = XtOffsetOf(php_pspell_object, std); - INIT_CLASS_ENTRY(ce, "PSpellConfig", class_PSpellConfig_methods); - php_pspell_config_ce = zend_register_internal_class(&ce); - php_pspell_config_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES; + php_pspell_config_ce = register_class_PSpellConfig(); php_pspell_config_ce->create_object = php_pspell_config_object_create; php_pspell_config_ce->serialize = zend_class_serialize_deny; php_pspell_config_ce->unserialize = zend_class_unserialize_deny; diff --git a/ext/pspell/pspell.stub.php b/ext/pspell/pspell.stub.php index a10de4b9f9..40a2a73097 100644 --- a/ext/pspell/pspell.stub.php +++ b/ext/pspell/pspell.stub.php @@ -1,8 +1,10 @@ <?php -/** @generate-function-entries */ +/** @generate-class-entries */ +/** @strict-properties */ final class PSpell {} +/** @strict-properties */ final class PSpellConfig {} function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): PSpell|false {} diff --git a/ext/pspell/pspell_arginfo.h b/ext/pspell/pspell_arginfo.h index f3b7b55310..6a42dd58ae 100644 --- a/ext/pspell/pspell_arginfo.h +++ b/ext/pspell/pspell_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: efc4c20a1507cfba58ec265a2fe6f61b1e0f8a61 */ + * Stub hash: d7a2f6b4aa719778166e5a255432f03100184a42 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, PSpell, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0) @@ -143,3 +143,26 @@ static const zend_function_entry class_PSpell_methods[] = { static const zend_function_entry class_PSpellConfig_methods[] = { ZEND_FE_END }; + +zend_class_entry *register_class_PSpell() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "PSpell", class_PSpell_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_PSpellConfig() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "PSpellConfig", class_PSpellConfig_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; +} + diff --git a/ext/readline/readline.stub.php b/ext/readline/readline.stub.php index cfc1d0d8d5..26f5755923 100644 --- a/ext/readline/readline.stub.php +++ b/ext/readline/readline.stub.php @@ -1,6 +1,6 @@ <?php -/** @generate-function-entries */ +/** @generate-class-entries */ function readline(?string $prompt = null): string|false {} diff --git a/ext/readline/readline_arginfo.h b/ext/readline/readline_arginfo.h index 0b432d1e4e..aed8228a9b 100644 --- a/ext/readline/readline_arginfo.h +++ b/ext/readline/readline_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 226b138a99e3e32aea90cbb5c44446ac7c16db71 */ + * Stub hash: d121fe2e6860eb29eba0b4d34c446cd08e3c6f43 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readline, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prompt, IS_STRING, 1, "null") @@ -114,3 +114,4 @@ static const zend_function_entry ext_functions[] = { #endif ZEND_FE_END }; + diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 73c6926b0d..2f1a358518 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -6511,8 +6511,6 @@ static void reflection_init_class_handlers(zend_class_entry *ce) { PHP_MINIT_FUNCTION(reflection) /* {{{ */ { - zend_class_entry _reflection_entry; - memcpy(&reflection_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); reflection_object_handlers.offset = XtOffsetOf(reflection_object, zo); reflection_object_handlers.free_obj = reflection_free_objects_storage; @@ -6520,59 +6518,37 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ reflection_object_handlers.write_property = _reflection_write_property; reflection_object_handlers.get_gc = reflection_get_gc; - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", class_ReflectionException_methods); - reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_ce_exception); + reflection_exception_ptr = register_class_ReflectionException(zend_ce_exception); - INIT_CLASS_ENTRY(_reflection_entry, "Reflection", class_Reflection_methods); - reflection_ptr = zend_register_internal_class(&_reflection_entry); + reflection_ptr = register_class_Reflection(); - INIT_CLASS_ENTRY(_reflection_entry, "Reflector", class_Reflector_methods); - reflector_ptr = zend_register_internal_interface(&_reflection_entry); - zend_class_implements(reflector_ptr, 1, zend_ce_stringable); + reflector_ptr = register_class_Reflector(zend_ce_stringable); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunctionAbstract", class_ReflectionFunctionAbstract_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_function_abstract_ptr = zend_register_internal_class(&_reflection_entry); - zend_class_implements(reflection_function_abstract_ptr, 1, reflector_ptr); - zend_declare_property_string(reflection_function_abstract_ptr, "name", sizeof("name")-1, "", ZEND_ACC_ABSTRACT); + reflection_function_abstract_ptr = register_class_ReflectionFunctionAbstract(reflector_ptr); + reflection_init_class_handlers(reflection_function_abstract_ptr); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunction", class_ReflectionFunction_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_function_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_function_abstract_ptr); - zend_declare_property_string(reflection_function_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); + reflection_function_ptr = register_class_ReflectionFunction(reflection_function_abstract_ptr); + reflection_init_class_handlers(reflection_function_ptr); REGISTER_REFLECTION_CLASS_CONST_LONG(function, "IS_DEPRECATED", ZEND_ACC_DEPRECATED); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionGenerator", class_ReflectionGenerator_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_generator_ptr = zend_register_internal_class(&_reflection_entry); - reflection_generator_ptr->ce_flags |= ZEND_ACC_FINAL; - - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionParameter", class_ReflectionParameter_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_parameter_ptr = zend_register_internal_class(&_reflection_entry); - zend_class_implements(reflection_parameter_ptr, 1, reflector_ptr); - zend_declare_property_string(reflection_parameter_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); - - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionType", class_ReflectionType_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_type_ptr = zend_register_internal_class(&_reflection_entry); - reflection_type_ptr->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; - zend_class_implements(reflection_type_ptr, 1, zend_ce_stringable); - - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionNamedType", class_ReflectionNamedType_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_named_type_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_type_ptr); - - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionUnionType", class_ReflectionUnionType_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_union_type_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_type_ptr); - - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionMethod", class_ReflectionMethod_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_method_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_function_abstract_ptr); - zend_declare_property_string(reflection_method_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); - zend_declare_property_string(reflection_method_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC); + reflection_generator_ptr = register_class_ReflectionGenerator(); + reflection_init_class_handlers(reflection_generator_ptr); + + reflection_parameter_ptr = register_class_ReflectionParameter(reflector_ptr); + reflection_init_class_handlers(reflection_parameter_ptr); + + reflection_type_ptr = register_class_ReflectionType(zend_ce_stringable); + reflection_init_class_handlers(reflection_type_ptr); + + reflection_named_type_ptr = register_class_ReflectionNamedType(reflection_type_ptr); + reflection_init_class_handlers(reflection_named_type_ptr); + + reflection_union_type_ptr = register_class_ReflectionUnionType(reflection_type_ptr); + reflection_init_class_handlers(reflection_union_type_ptr); + + reflection_method_ptr = register_class_ReflectionMethod(reflection_function_abstract_ptr); + reflection_init_class_handlers(reflection_method_ptr); REGISTER_REFLECTION_CLASS_CONST_LONG(method, "IS_STATIC", ZEND_ACC_STATIC); REGISTER_REFLECTION_CLASS_CONST_LONG(method, "IS_PUBLIC", ZEND_ACC_PUBLIC); @@ -6581,65 +6557,43 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ REGISTER_REFLECTION_CLASS_CONST_LONG(method, "IS_ABSTRACT", ZEND_ACC_ABSTRACT); REGISTER_REFLECTION_CLASS_CONST_LONG(method, "IS_FINAL", ZEND_ACC_FINAL); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClass", class_ReflectionClass_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_class_ptr = zend_register_internal_class(&_reflection_entry); - zend_class_implements(reflection_class_ptr, 1, reflector_ptr); - zend_declare_property_string(reflection_class_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); + reflection_class_ptr = register_class_ReflectionClass(reflector_ptr); + reflection_init_class_handlers(reflection_class_ptr); /* IS_IMPLICIT_ABSTRACT is not longer used */ REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_IMPLICIT_ABSTRACT", ZEND_ACC_IMPLICIT_ABSTRACT_CLASS); REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_EXPLICIT_ABSTRACT", ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_FINAL", ZEND_ACC_FINAL); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionObject", class_ReflectionObject_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_object_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_class_ptr); + reflection_object_ptr = register_class_ReflectionObject(reflection_class_ptr); + reflection_init_class_handlers(reflection_object_ptr); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionProperty", class_ReflectionProperty_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_property_ptr = zend_register_internal_class(&_reflection_entry); - zend_class_implements(reflection_property_ptr, 1, reflector_ptr); - zend_declare_property_string(reflection_property_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); - zend_declare_property_string(reflection_property_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC); + reflection_property_ptr = register_class_ReflectionProperty(reflector_ptr); + reflection_init_class_handlers(reflection_property_ptr); REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_STATIC", ZEND_ACC_STATIC); REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PUBLIC", ZEND_ACC_PUBLIC); REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PROTECTED", ZEND_ACC_PROTECTED); REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PRIVATE", ZEND_ACC_PRIVATE); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClassConstant", class_ReflectionClassConstant_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_class_constant_ptr = zend_register_internal_class(&_reflection_entry); - zend_class_implements(reflection_class_constant_ptr, 1, reflector_ptr); - zend_declare_property_string(reflection_class_constant_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); - zend_declare_property_string(reflection_class_constant_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC); + reflection_class_constant_ptr = register_class_ReflectionClassConstant(reflector_ptr); + reflection_init_class_handlers(reflection_class_constant_ptr); REGISTER_REFLECTION_CLASS_CONST_LONG(class_constant, "IS_PUBLIC", ZEND_ACC_PUBLIC); REGISTER_REFLECTION_CLASS_CONST_LONG(class_constant, "IS_PROTECTED", ZEND_ACC_PROTECTED); REGISTER_REFLECTION_CLASS_CONST_LONG(class_constant, "IS_PRIVATE", ZEND_ACC_PRIVATE); - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionExtension", class_ReflectionExtension_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_extension_ptr = zend_register_internal_class(&_reflection_entry); - zend_class_implements(reflection_extension_ptr, 1, reflector_ptr); - zend_declare_property_string(reflection_extension_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); - - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionZendExtension", class_ReflectionZendExtension_methods); - reflection_init_class_handlers(&_reflection_entry); - reflection_zend_extension_ptr = zend_register_internal_class(&_reflection_entry); - zend_class_implements(reflection_zend_extension_ptr, 1, reflector_ptr); - zend_declare_property_string(reflection_zend_extension_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC); - - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionReference", class_ReflectionReference_methods); - reflection_init_class_handlers(&_reflection_entry); - _reflection_entry.ce_flags |= ZEND_ACC_FINAL; - reflection_reference_ptr = zend_register_internal_class(&_reflection_entry); - - INIT_CLASS_ENTRY(_reflection_entry, "ReflectionAttribute", class_ReflectionAttribute_methods); - reflection_init_class_handlers(&_reflection_entry); - _reflection_entry.ce_flags |= ZEND_ACC_FINAL; - reflection_attribute_ptr = zend_register_internal_class(&_reflection_entry); + reflection_extension_ptr = register_class_ReflectionExtension(reflector_ptr); + reflection_init_class_handlers(reflection_extension_ptr); + + reflection_zend_extension_ptr = register_class_ReflectionZendExtension(reflector_ptr); + reflection_init_class_handlers(reflection_zend_extension_ptr); + + reflection_reference_ptr = register_class_ReflectionReference(); + reflection_init_class_handlers(reflection_reference_ptr); + + reflection_attribute_ptr = register_class_ReflectionAttribute(); + reflection_init_class_handlers(reflection_attribute_ptr); REGISTER_REFLECTION_CLASS_CONST_LONG(attribute, "IS_INSTANCEOF", REFLECTION_ATTRIBUTE_IS_INSTANCEOF); diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index d12d10bd81..8a67c43a99 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -1,6 +1,6 @@ <?php -/** @generate-function-entries */ +/** @generate-class-entries */ class ReflectionException extends Exception { @@ -18,6 +18,9 @@ interface Reflector extends Stringable abstract class ReflectionFunctionAbstract implements Reflector { + /** @var string */ + public $name = ""; + /** @implementation-alias ReflectionClass::__clone */ final private function __clone(): void {} @@ -147,6 +150,9 @@ final class ReflectionGenerator class ReflectionMethod extends ReflectionFunctionAbstract { + /** @var string */ + public $class = ""; + public function __construct(object|string $objectOrMethod, ?string $method = null) {} public function __toString(): string {} @@ -199,6 +205,9 @@ class ReflectionMethod extends ReflectionFunctionAbstract class ReflectionClass implements Reflector { + /** @var string */ + public $name = ""; + final private function __clone(): void {} public function __construct(object|string $objectOrClass) {} @@ -369,6 +378,12 @@ class ReflectionObject extends ReflectionClass class ReflectionProperty implements Reflector { + /** @var string */ + public $name = ""; + + /** @var string */ + public $class = ""; + /** @implementation-alias ReflectionClass::__clone */ final private function __clone(): void {} @@ -434,6 +449,12 @@ class ReflectionProperty implements Reflector class ReflectionClassConstant implements Reflector { + /** @var string */ + public $name = ""; + + /** @var string */ + public $class = ""; + /** @implementation-alias ReflectionClass::__clone */ final private function __clone(): void {} @@ -471,6 +492,9 @@ class ReflectionClassConstant implements Reflector class ReflectionParameter implements Reflector { + /** @var string */ + public $name = ""; + /** @implementation-alias ReflectionClass::__clone */ final private function __clone(): void {} @@ -575,6 +599,9 @@ class ReflectionUnionType extends ReflectionType class ReflectionExtension implements Reflector { + /** @var string */ + public $name = ""; + /** @implementation-alias ReflectionClass::__clone */ final private function __clone(): void {} @@ -618,6 +645,9 @@ class ReflectionExtension implements Reflector class ReflectionZendExtension implements Reflector { + /** @var string */ + public $name = ""; + /** @implementation-alias ReflectionClass::__clone */ final private function __clone(): void {} diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index ba524b4f6d..ebc488a138 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 6849bff1f2b343df4bd7e6da9c8adc555731e2d3 */ + * Stub hash: 5c4f082e36118b7a955cc1d6b1fda385dd7c0bc0 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0) @@ -994,3 +994,268 @@ static const zend_function_entry class_ReflectionAttribute_methods[] = { ZEND_ME(ReflectionAttribute, __construct, arginfo_class_ReflectionAttribute___construct, ZEND_ACC_PRIVATE) ZEND_FE_END }; + +zend_class_entry *register_class_ReflectionException(zend_class_entry *class_entry_Exception) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionException", class_ReflectionException_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception); + + return class_entry; +} + +zend_class_entry *register_class_Reflection() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "Reflection", class_Reflection_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + + return class_entry; +} + +zend_class_entry *register_class_Reflector(zend_class_entry *class_entry_Stringable) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "Reflector", class_Reflector_methods); + class_entry = zend_register_internal_interface(&ce); + zend_class_implements(class_entry, 1, class_entry_Stringable); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionFunctionAbstract(zend_class_entry *class_entry_Reflector) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionFunctionAbstract", class_ReflectionFunctionAbstract_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_ABSTRACT; + zend_class_implements(class_entry, 1, class_entry_Reflector); + + zval property_name_default_value; + ZVAL_EMPTY_STRING(&property_name_default_value); + zend_string *property_name_name = zend_string_init("name", sizeof("name") - 1, 1); + zend_declare_property_ex(class_entry, property_name_name, &property_name_default_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(property_name_name); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionFunction(zend_class_entry *class_entry_ReflectionFunctionAbstract) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionFunction", class_ReflectionFunction_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_ReflectionFunctionAbstract); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionGenerator() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionGenerator", class_ReflectionGenerator_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_ReflectionMethod(zend_class_entry *class_entry_ReflectionFunctionAbstract) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionMethod", class_ReflectionMethod_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_ReflectionFunctionAbstract); + + zval property_class_default_value; + ZVAL_EMPTY_STRING(&property_class_default_value); + zend_string *property_class_name = zend_string_init("class", sizeof("class") - 1, 1); + zend_declare_property_ex(class_entry, property_class_name, &property_class_default_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(property_class_name); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionClass(zend_class_entry *class_entry_Reflector) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionClass", class_ReflectionClass_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + zend_class_implements(class_entry, 1, class_entry_Reflector); + + zval property_name_default_value; + ZVAL_EMPTY_STRING(&property_name_default_value); + zend_string *property_name_name = zend_string_init("name", sizeof("name") - 1, 1); + zend_declare_property_ex(class_entry, property_name_name, &property_name_default_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(property_name_name); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionObject(zend_class_entry *class_entry_ReflectionClass) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionObject", class_ReflectionObject_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_ReflectionClass); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionProperty(zend_class_entry *class_entry_Reflector) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionProperty", class_ReflectionProperty_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + zend_class_implements(class_entry, 1, class_entry_Reflector); + + zval property_name_default_value; + ZVAL_EMPTY_STRING(&property_name_default_value); + zend_string *property_name_name = zend_string_init("name", sizeof("name") - 1, 1); + zend_declare_property_ex(class_entry, property_name_name, &property_name_default_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(property_name_name); + + zval property_class_default_value; + ZVAL_EMPTY_STRING(&property_class_default_value); + zend_string *property_class_name = zend_string_init("class", sizeof("class") - 1, 1); + zend_declare_property_ex(class_entry, property_class_name, &property_class_default_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(property_class_name); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionClassConstant(zend_class_entry *class_entry_Reflector) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionClassConstant", class_ReflectionClassConstant_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + zend_class_implements(class_entry, 1, class_entry_Reflector); + + zval property_name_default_value; + ZVAL_EMPTY_STRING(&property_name_default_value); + zend_string *property_name_name = zend_string_init("name", sizeof("name") - 1, 1); + zend_declare_property_ex(class_entry, property_name_name, &property_name_default_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(property_name_name); + + zval property_class_default_value; + ZVAL_EMPTY_STRING(&property_class_default_value); + zend_string *property_class_name = zend_string_init("class", sizeof("class") - 1, 1); + zend_declare_property_ex(class_entry, property_class_name, &property_class_default_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(property_class_name); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionParameter(zend_class_entry *class_entry_Reflector) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionParameter", class_ReflectionParameter_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + zend_class_implements(class_entry, 1, class_entry_Reflector); + + zval property_name_default_value; + ZVAL_EMPTY_STRING(&property_name_default_value); + zend_string *property_name_name = zend_string_init("name", sizeof("name") - 1, 1); + zend_declare_property_ex(class_entry, property_name_name, &property_name_default_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(property_name_name); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionType(zend_class_entry *class_entry_Stringable) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionType", class_ReflectionType_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_ABSTRACT; + zend_class_implements(class_entry, 1, class_entry_Stringable); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionNamedType(zend_class_entry *class_entry_ReflectionType) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionNamedType", class_ReflectionNamedType_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_ReflectionType); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionUnionType(zend_class_entry *class_entry_ReflectionType) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionUnionType", class_ReflectionUnionType_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_ReflectionType); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionExtension(zend_class_entry *class_entry_Reflector) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionExtension", class_ReflectionExtension_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + zend_class_implements(class_entry, 1, class_entry_Reflector); + + zval property_name_default_value; + ZVAL_EMPTY_STRING(&property_name_default_value); + zend_string *property_name_name = zend_string_init("name", sizeof("name") - 1, 1); + zend_declare_property_ex(class_entry, property_name_name, &property_name_default_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(property_name_name); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionZendExtension(zend_class_entry *class_entry_Reflector) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionZendExtension", class_ReflectionZendExtension_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + zend_class_implements(class_entry, 1, class_entry_Reflector); + + zval property_name_default_value; + ZVAL_EMPTY_STRING(&property_name_default_value); + zend_string *property_name_name = zend_string_init("name", sizeof("name") - 1, 1); + zend_declare_property_ex(class_entry, property_name_name, &property_name_default_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(property_name_name); + + return class_entry; +} + +zend_class_entry *register_class_ReflectionReference() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionReference", class_ReflectionReference_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_ReflectionAttribute() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "ReflectionAttribute", class_ReflectionAttribute_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_FINAL; + + return class_entry; +} + diff --git a/ext/session/php_session.h b/ext/session/php_session.h index a18b075dab..1a2bc9164f 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -305,16 +305,12 @@ PHPAPI ZEND_EXTERN_MODULE_GLOBALS(ps) void php_session_auto_start(void *data); -#define PS_CLASS_NAME "SessionHandler" extern PHPAPI zend_class_entry *php_session_class_entry; -#define PS_IFACE_NAME "SessionHandlerInterface" extern PHPAPI zend_class_entry *php_session_iface_entry; -#define PS_SID_IFACE_NAME "SessionIdInterface" extern PHPAPI zend_class_entry *php_session_id_iface_entry; -#define PS_UPDATE_TIMESTAMP_IFACE_NAME "SessionUpdateTimestampHandlerInterface" extern PHPAPI zend_class_entry *php_session_update_timestamp_iface_entry; extern PHP_METHOD(SessionHandler, open); diff --git a/ext/session/session.c b/ext/session/session.c index 5eda7eae8e..7a78c87805 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2779,8 +2779,6 @@ static PHP_GINIT_FUNCTION(ps) /* {{{ */ static PHP_MINIT_FUNCTION(session) /* {{{ */ { - zend_class_entry ce; - zend_register_auto_global(zend_string_init_interned("_SESSION", sizeof("_SESSION") - 1, 1), 0, NULL); my_module_number = module_number; @@ -2796,23 +2794,14 @@ static PHP_MINIT_FUNCTION(session) /* {{{ */ php_rfc1867_callback = php_session_rfc1867_callback; /* Register interfaces */ - INIT_CLASS_ENTRY(ce, PS_IFACE_NAME, class_SessionHandlerInterface_methods); - php_session_iface_entry = zend_register_internal_class(&ce); - php_session_iface_entry->ce_flags |= ZEND_ACC_INTERFACE; + php_session_iface_entry = register_class_SessionHandlerInterface(); - INIT_CLASS_ENTRY(ce, PS_SID_IFACE_NAME, class_SessionIdInterface_methods); - php_session_id_iface_entry = zend_register_internal_class(&ce); - php_session_id_iface_entry->ce_flags |= ZEND_ACC_INTERFACE; + php_session_id_iface_entry = register_class_SessionIdInterface(); - INIT_CLASS_ENTRY(ce, PS_UPDATE_TIMESTAMP_IFACE_NAME, class_SessionUpdateTimestampHandlerInterface_methods); - php_session_update_timestamp_iface_entry = zend_register_internal_class(&ce); - php_session_update_timestamp_iface_entry->ce_flags |= ZEND_ACC_INTERFACE; + php_session_update_timestamp_iface_entry = register_class_SessionUpdateTimestampHandlerInterface(); /* Register base class */ - INIT_CLASS_ENTRY(ce, PS_CLASS_NAME, class_SessionHandler_methods); - php_session_class_entry = zend_register_internal_class(&ce); - zend_class_implements(php_session_class_entry, 1, php_session_iface_entry); - zend_class_implements(php_session_class_entry, 1, php_session_id_iface_entry); + php_session_class_entry = register_class_SessionHandler(php_session_iface_entry, php_session_id_iface_entry); REGISTER_LONG_CONSTANT("PHP_SESSION_DISABLED", php_session_disabled, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PHP_SESSION_NONE", php_session_none, CONST_CS | CONST_PERSISTENT); diff --git a/ext/session/session.stub.php b/ext/session/session.stub.php index d8c9b67e50..c8f7308b13 100644 --- a/ext/session/session.stub.php +++ b/ext/session/session.stub.php @@ -1,6 +1,6 @@ <?php -/** @generate-function-entries */ +/** @generate-class-entries */ function session_name(?string $name = null): string|false {} diff --git a/ext/session/session_arginfo.h b/ext/session/session_arginfo.h index 0c82feabb2..afc44c5c81 100644 --- a/ext/session/session_arginfo.h +++ b/ext/session/session_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 8175feea632f2832e43d830e70dc9332377b9f22 */ + * Stub hash: 84df891ffafa76a34679f4d298f1a1e91a5c23bf */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_name, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") @@ -226,3 +226,45 @@ static const zend_function_entry class_SessionHandler_methods[] = { ZEND_ME(SessionHandler, create_sid, arginfo_class_SessionHandler_create_sid, ZEND_ACC_PUBLIC) ZEND_FE_END }; + +zend_class_entry *register_class_SessionHandlerInterface() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SessionHandlerInterface", class_SessionHandlerInterface_methods); + class_entry = zend_register_internal_interface(&ce); + + return class_entry; +} + +zend_class_entry *register_class_SessionIdInterface() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SessionIdInterface", class_SessionIdInterface_methods); + class_entry = zend_register_internal_interface(&ce); + + return class_entry; +} + +zend_class_entry *register_class_SessionUpdateTimestampHandlerInterface() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SessionUpdateTimestampHandlerInterface", class_SessionUpdateTimestampHandlerInterface_methods); + class_entry = zend_register_internal_interface(&ce); + + return class_entry; +} + +zend_class_entry *register_class_SessionHandler(zend_class_entry *class_entry_SessionHandlerInterface, zend_class_entry *class_entry_SessionIdInterface) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SessionHandler", class_SessionHandler_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + zend_class_implements(class_entry, 2, class_entry_SessionHandlerInterface, class_entry_SessionIdInterface); + + return class_entry; +} + diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 3d8975e76f..21442675e2 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -108,10 +108,7 @@ static void shmop_free_obj(zend_object *object) /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(shmop) { - zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Shmop", class_Shmop_methods); - shmop_ce = zend_register_internal_class(&ce); - shmop_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES; + shmop_ce = register_class_Shmop(); shmop_ce->create_object = shmop_create_object; shmop_ce->serialize = zend_class_serialize_deny; shmop_ce->unserialize = zend_class_unserialize_deny; diff --git a/ext/shmop/shmop.stub.php b/ext/shmop/shmop.stub.php index 9485953502..dcf3e5ab03 100644 --- a/ext/shmop/shmop.stub.php +++ b/ext/shmop/shmop.stub.php @@ -1,7 +1,8 @@ <?php -/** @generate-function-entries */ +/** @generate-class-entries */ +/** @strict-properties */ final class Shmop {} function shmop_open(int $key, string $mode, int $permissions, int $size): Shmop|false {} diff --git a/ext/shmop/shmop_arginfo.h b/ext/shmop/shmop_arginfo.h index 3b92a62c2c..6f1b225690 100644 --- a/ext/shmop/shmop_arginfo.h +++ b/ext/shmop/shmop_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 81173e82e0378d5b5c729a3cce8561e0ca56e092 */ + * Stub hash: be10d3d4ec73b674227600dcd975230290e4c2cd */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_shmop_open, 0, 4, Shmop, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0) @@ -55,3 +55,15 @@ static const zend_function_entry ext_functions[] = { static const zend_function_entry class_Shmop_methods[] = { ZEND_FE_END }; + +zend_class_entry *register_class_Shmop() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "Shmop", class_Shmop_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; +} + |