Skip to content

Commit 5b5bfd6

Browse files
committed
Generate class entries from stubs for phar, posix, pspell, readline, reflection, session, shmop
Closes GH-6692
1 parent af56982 commit 5b5bfd6

20 files changed

+488
-147
lines changed

ext/phar/phar_object.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5074,23 +5074,13 @@ PHP_METHOD(PharFileInfo, decompress)
50745074

50755075
void phar_object_init(void) /* {{{ */
50765076
{
5077-
zend_class_entry ce;
5077+
phar_ce_PharException = register_class_PharException(zend_ce_exception);
50785078

5079-
INIT_CLASS_ENTRY(ce, "PharException", class_PharException_methods);
5080-
phar_ce_PharException = zend_register_internal_class_ex(&ce, zend_ce_exception);
5079+
phar_ce_archive = register_class_Phar(spl_ce_RecursiveDirectoryIterator, zend_ce_countable, zend_ce_arrayaccess);
50815080

5082-
INIT_CLASS_ENTRY(ce, "Phar", class_Phar_methods);
5083-
phar_ce_archive = zend_register_internal_class_ex(&ce, spl_ce_RecursiveDirectoryIterator);
5081+
phar_ce_data = register_class_PharData(spl_ce_RecursiveDirectoryIterator, zend_ce_countable, zend_ce_arrayaccess);
50845082

5085-
zend_class_implements(phar_ce_archive, 2, zend_ce_countable, zend_ce_arrayaccess);
5086-
5087-
INIT_CLASS_ENTRY(ce, "PharData", class_PharData_methods);
5088-
phar_ce_data = zend_register_internal_class_ex(&ce, spl_ce_RecursiveDirectoryIterator);
5089-
5090-
zend_class_implements(phar_ce_data, 2, zend_ce_countable, zend_ce_arrayaccess);
5091-
5092-
INIT_CLASS_ENTRY(ce, "PharFileInfo", class_PharFileInfo_methods);
5093-
phar_ce_entry = zend_register_internal_class_ex(&ce, spl_ce_SplFileInfo);
5083+
phar_ce_entry = register_class_PharFileInfo(spl_ce_SplFileInfo);
50945084

50955085
REGISTER_PHAR_CLASS_CONST_LONG(phar_ce_archive, "BZ2", PHAR_ENT_COMPRESSED_BZ2)
50965086
REGISTER_PHAR_CLASS_CONST_LONG(phar_ce_archive, "GZ", PHAR_ENT_COMPRESSED_GZ)

ext/phar/phar_object.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
/** @generate-function-entries */
3+
/** @generate-class-entries */
44

55
class PharException extends Exception
66
{

ext/phar/phar_object_arginfo.h

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: bad833e724b1ebface8e8331310ecf7c32a52898 */
2+
* Stub hash: 8f6974078c7b16fd452a34a9e1b5c509699a2037 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -581,3 +581,46 @@ static const zend_function_entry class_PharFileInfo_methods[] = {
581581
ZEND_ME(PharFileInfo, setMetadata, arginfo_class_PharFileInfo_setMetadata, ZEND_ACC_PUBLIC)
582582
ZEND_FE_END
583583
};
584+
585+
zend_class_entry *register_class_PharException(zend_class_entry *class_entry_Exception)
586+
{
587+
zend_class_entry ce, *class_entry;
588+
589+
INIT_CLASS_ENTRY(ce, "PharException", class_PharException_methods);
590+
class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception);
591+
592+
return class_entry;
593+
}
594+
595+
zend_class_entry *register_class_Phar(zend_class_entry *class_entry_RecursiveDirectoryIterator, zend_class_entry *class_entry_Countable, zend_class_entry *class_entry_ArrayAccess)
596+
{
597+
zend_class_entry ce, *class_entry;
598+
599+
INIT_CLASS_ENTRY(ce, "Phar", class_Phar_methods);
600+
class_entry = zend_register_internal_class_ex(&ce, class_entry_RecursiveDirectoryIterator);
601+
zend_class_implements(class_entry, 2, class_entry_Countable, class_entry_ArrayAccess);
602+
603+
return class_entry;
604+
}
605+
606+
zend_class_entry *register_class_PharData(zend_class_entry *class_entry_RecursiveDirectoryIterator, zend_class_entry *class_entry_Countable, zend_class_entry *class_entry_ArrayAccess)
607+
{
608+
zend_class_entry ce, *class_entry;
609+
610+
INIT_CLASS_ENTRY(ce, "PharData", class_PharData_methods);
611+
class_entry = zend_register_internal_class_ex(&ce, class_entry_RecursiveDirectoryIterator);
612+
zend_class_implements(class_entry, 2, class_entry_Countable, class_entry_ArrayAccess);
613+
614+
return class_entry;
615+
}
616+
617+
zend_class_entry *register_class_PharFileInfo(zend_class_entry *class_entry_SplFileInfo)
618+
{
619+
zend_class_entry ce, *class_entry;
620+
621+
INIT_CLASS_ENTRY(ce, "PharFileInfo", class_PharFileInfo_methods);
622+
class_entry = zend_register_internal_class_ex(&ce, class_entry_SplFileInfo);
623+
624+
return class_entry;
625+
}
626+

ext/posix/posix.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
/** @generate-function-entries */
3+
/** @generate-class-entries */
44

55
function posix_kill(int $process_id, int $signal): bool {}
66

ext/posix/posix_arginfo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 6d1383a6f98104498b466ce5d9dcf5721760e8b7 */
2+
* Stub hash: 954c403785617dade95048b4345a34d4ec5d91c3 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_kill, 0, 2, _IS_BOOL, 0)
55
ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0)
@@ -290,3 +290,4 @@ static const zend_function_entry ext_functions[] = {
290290
#endif
291291
ZEND_FE_END
292292
};
293+

ext/pspell/pspell.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,7 @@ static void php_pspell_config_object_free(zend_object *zobj) {
150150
/* {{{ PHP_MINIT_FUNCTION */
151151
static PHP_MINIT_FUNCTION(pspell)
152152
{
153-
zend_class_entry ce;
154-
INIT_CLASS_ENTRY(ce, "PSpell", class_PSpell_methods);
155-
php_pspell_ce = zend_register_internal_class(&ce);
156-
php_pspell_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
153+
php_pspell_ce = register_class_PSpell();
157154
php_pspell_ce->create_object = php_pspell_object_create;
158155
php_pspell_ce->serialize = zend_class_serialize_deny;
159156
php_pspell_ce->unserialize = zend_class_unserialize_deny;
@@ -164,9 +161,7 @@ static PHP_MINIT_FUNCTION(pspell)
164161
php_pspell_handlers.get_constructor = php_pspell_object_get_constructor;
165162
php_pspell_handlers.offset = XtOffsetOf(php_pspell_object, std);
166163

167-
INIT_CLASS_ENTRY(ce, "PSpellConfig", class_PSpellConfig_methods);
168-
php_pspell_config_ce = zend_register_internal_class(&ce);
169-
php_pspell_config_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
164+
php_pspell_config_ce = register_class_PSpellConfig();
170165
php_pspell_config_ce->create_object = php_pspell_config_object_create;
171166
php_pspell_config_ce->serialize = zend_class_serialize_deny;
172167
php_pspell_config_ce->unserialize = zend_class_unserialize_deny;

ext/pspell/pspell.stub.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<?php
22

3-
/** @generate-function-entries */
3+
/** @generate-class-entries */
44

5+
/** @strict-properties */
56
final class PSpell {}
7+
/** @strict-properties */
68
final class PSpellConfig {}
79

810
function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): PSpell|false {}

ext/pspell/pspell_arginfo.h

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: efc4c20a1507cfba58ec265a2fe6f61b1e0f8a61 */
2+
* Stub hash: d7a2f6b4aa719778166e5a255432f03100184a42 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, PSpell, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
@@ -143,3 +143,26 @@ static const zend_function_entry class_PSpell_methods[] = {
143143
static const zend_function_entry class_PSpellConfig_methods[] = {
144144
ZEND_FE_END
145145
};
146+
147+
zend_class_entry *register_class_PSpell()
148+
{
149+
zend_class_entry ce, *class_entry;
150+
151+
INIT_CLASS_ENTRY(ce, "PSpell", class_PSpell_methods);
152+
class_entry = zend_register_internal_class_ex(&ce, NULL);
153+
class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
154+
155+
return class_entry;
156+
}
157+
158+
zend_class_entry *register_class_PSpellConfig()
159+
{
160+
zend_class_entry ce, *class_entry;
161+
162+
INIT_CLASS_ENTRY(ce, "PSpellConfig", class_PSpellConfig_methods);
163+
class_entry = zend_register_internal_class_ex(&ce, NULL);
164+
class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
165+
166+
return class_entry;
167+
}
168+

ext/readline/readline.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
/** @generate-function-entries */
3+
/** @generate-class-entries */
44

55
function readline(?string $prompt = null): string|false {}
66

ext/readline/readline_arginfo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 226b138a99e3e32aea90cbb5c44446ac7c16db71 */
2+
* Stub hash: d121fe2e6860eb29eba0b4d34c446cd08e3c6f43 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readline, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prompt, IS_STRING, 1, "null")
@@ -114,3 +114,4 @@ static const zend_function_entry ext_functions[] = {
114114
#endif
115115
ZEND_FE_END
116116
};
117+

ext/reflection/php_reflection.c

Lines changed: 43 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -6511,68 +6511,44 @@ static void reflection_init_class_handlers(zend_class_entry *ce) {
65116511

65126512
PHP_MINIT_FUNCTION(reflection) /* {{{ */
65136513
{
6514-
zend_class_entry _reflection_entry;
6515-
65166514
memcpy(&reflection_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
65176515
reflection_object_handlers.offset = XtOffsetOf(reflection_object, zo);
65186516
reflection_object_handlers.free_obj = reflection_free_objects_storage;
65196517
reflection_object_handlers.clone_obj = NULL;
65206518
reflection_object_handlers.write_property = _reflection_write_property;
65216519
reflection_object_handlers.get_gc = reflection_get_gc;
65226520

6523-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", class_ReflectionException_methods);
6524-
reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_ce_exception);
6521+
reflection_exception_ptr = register_class_ReflectionException(zend_ce_exception);
65256522

6526-
INIT_CLASS_ENTRY(_reflection_entry, "Reflection", class_Reflection_methods);
6527-
reflection_ptr = zend_register_internal_class(&_reflection_entry);
6523+
reflection_ptr = register_class_Reflection();
65286524

6529-
INIT_CLASS_ENTRY(_reflection_entry, "Reflector", class_Reflector_methods);
6530-
reflector_ptr = zend_register_internal_interface(&_reflection_entry);
6531-
zend_class_implements(reflector_ptr, 1, zend_ce_stringable);
6525+
reflector_ptr = register_class_Reflector(zend_ce_stringable);
65326526

6533-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunctionAbstract", class_ReflectionFunctionAbstract_methods);
6534-
reflection_init_class_handlers(&_reflection_entry);
6535-
reflection_function_abstract_ptr = zend_register_internal_class(&_reflection_entry);
6536-
zend_class_implements(reflection_function_abstract_ptr, 1, reflector_ptr);
6537-
zend_declare_property_string(reflection_function_abstract_ptr, "name", sizeof("name")-1, "", ZEND_ACC_ABSTRACT);
6527+
reflection_function_abstract_ptr = register_class_ReflectionFunctionAbstract(reflector_ptr);
6528+
reflection_init_class_handlers(reflection_function_abstract_ptr);
65386529

6539-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunction", class_ReflectionFunction_methods);
6540-
reflection_init_class_handlers(&_reflection_entry);
6541-
reflection_function_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_function_abstract_ptr);
6542-
zend_declare_property_string(reflection_function_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC);
6530+
reflection_function_ptr = register_class_ReflectionFunction(reflection_function_abstract_ptr);
6531+
reflection_init_class_handlers(reflection_function_ptr);
65436532

65446533
REGISTER_REFLECTION_CLASS_CONST_LONG(function, "IS_DEPRECATED", ZEND_ACC_DEPRECATED);
65456534

6546-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionGenerator", class_ReflectionGenerator_methods);
6547-
reflection_init_class_handlers(&_reflection_entry);
6548-
reflection_generator_ptr = zend_register_internal_class(&_reflection_entry);
6549-
reflection_generator_ptr->ce_flags |= ZEND_ACC_FINAL;
6550-
6551-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionParameter", class_ReflectionParameter_methods);
6552-
reflection_init_class_handlers(&_reflection_entry);
6553-
reflection_parameter_ptr = zend_register_internal_class(&_reflection_entry);
6554-
zend_class_implements(reflection_parameter_ptr, 1, reflector_ptr);
6555-
zend_declare_property_string(reflection_parameter_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC);
6556-
6557-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionType", class_ReflectionType_methods);
6558-
reflection_init_class_handlers(&_reflection_entry);
6559-
reflection_type_ptr = zend_register_internal_class(&_reflection_entry);
6560-
reflection_type_ptr->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
6561-
zend_class_implements(reflection_type_ptr, 1, zend_ce_stringable);
6562-
6563-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionNamedType", class_ReflectionNamedType_methods);
6564-
reflection_init_class_handlers(&_reflection_entry);
6565-
reflection_named_type_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_type_ptr);
6566-
6567-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionUnionType", class_ReflectionUnionType_methods);
6568-
reflection_init_class_handlers(&_reflection_entry);
6569-
reflection_union_type_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_type_ptr);
6570-
6571-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionMethod", class_ReflectionMethod_methods);
6572-
reflection_init_class_handlers(&_reflection_entry);
6573-
reflection_method_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_function_abstract_ptr);
6574-
zend_declare_property_string(reflection_method_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC);
6575-
zend_declare_property_string(reflection_method_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC);
6535+
reflection_generator_ptr = register_class_ReflectionGenerator();
6536+
reflection_init_class_handlers(reflection_generator_ptr);
6537+
6538+
reflection_parameter_ptr = register_class_ReflectionParameter(reflector_ptr);
6539+
reflection_init_class_handlers(reflection_parameter_ptr);
6540+
6541+
reflection_type_ptr = register_class_ReflectionType(zend_ce_stringable);
6542+
reflection_init_class_handlers(reflection_type_ptr);
6543+
6544+
reflection_named_type_ptr = register_class_ReflectionNamedType(reflection_type_ptr);
6545+
reflection_init_class_handlers(reflection_named_type_ptr);
6546+
6547+
reflection_union_type_ptr = register_class_ReflectionUnionType(reflection_type_ptr);
6548+
reflection_init_class_handlers(reflection_union_type_ptr);
6549+
6550+
reflection_method_ptr = register_class_ReflectionMethod(reflection_function_abstract_ptr);
6551+
reflection_init_class_handlers(reflection_method_ptr);
65766552

65776553
REGISTER_REFLECTION_CLASS_CONST_LONG(method, "IS_STATIC", ZEND_ACC_STATIC);
65786554
REGISTER_REFLECTION_CLASS_CONST_LONG(method, "IS_PUBLIC", ZEND_ACC_PUBLIC);
@@ -6581,65 +6557,43 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */
65816557
REGISTER_REFLECTION_CLASS_CONST_LONG(method, "IS_ABSTRACT", ZEND_ACC_ABSTRACT);
65826558
REGISTER_REFLECTION_CLASS_CONST_LONG(method, "IS_FINAL", ZEND_ACC_FINAL);
65836559

6584-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClass", class_ReflectionClass_methods);
6585-
reflection_init_class_handlers(&_reflection_entry);
6586-
reflection_class_ptr = zend_register_internal_class(&_reflection_entry);
6587-
zend_class_implements(reflection_class_ptr, 1, reflector_ptr);
6588-
zend_declare_property_string(reflection_class_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC);
6560+
reflection_class_ptr = register_class_ReflectionClass(reflector_ptr);
6561+
reflection_init_class_handlers(reflection_class_ptr);
65896562

65906563
/* IS_IMPLICIT_ABSTRACT is not longer used */
65916564
REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_IMPLICIT_ABSTRACT", ZEND_ACC_IMPLICIT_ABSTRACT_CLASS);
65926565
REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_EXPLICIT_ABSTRACT", ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);
65936566
REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_FINAL", ZEND_ACC_FINAL);
65946567

6595-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionObject", class_ReflectionObject_methods);
6596-
reflection_init_class_handlers(&_reflection_entry);
6597-
reflection_object_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_class_ptr);
6568+
reflection_object_ptr = register_class_ReflectionObject(reflection_class_ptr);
6569+
reflection_init_class_handlers(reflection_object_ptr);
65986570

6599-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionProperty", class_ReflectionProperty_methods);
6600-
reflection_init_class_handlers(&_reflection_entry);
6601-
reflection_property_ptr = zend_register_internal_class(&_reflection_entry);
6602-
zend_class_implements(reflection_property_ptr, 1, reflector_ptr);
6603-
zend_declare_property_string(reflection_property_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC);
6604-
zend_declare_property_string(reflection_property_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC);
6571+
reflection_property_ptr = register_class_ReflectionProperty(reflector_ptr);
6572+
reflection_init_class_handlers(reflection_property_ptr);
66056573

66066574
REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_STATIC", ZEND_ACC_STATIC);
66076575
REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PUBLIC", ZEND_ACC_PUBLIC);
66086576
REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PROTECTED", ZEND_ACC_PROTECTED);
66096577
REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PRIVATE", ZEND_ACC_PRIVATE);
66106578

6611-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClassConstant", class_ReflectionClassConstant_methods);
6612-
reflection_init_class_handlers(&_reflection_entry);
6613-
reflection_class_constant_ptr = zend_register_internal_class(&_reflection_entry);
6614-
zend_class_implements(reflection_class_constant_ptr, 1, reflector_ptr);
6615-
zend_declare_property_string(reflection_class_constant_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC);
6616-
zend_declare_property_string(reflection_class_constant_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC);
6579+
reflection_class_constant_ptr = register_class_ReflectionClassConstant(reflector_ptr);
6580+
reflection_init_class_handlers(reflection_class_constant_ptr);
66176581

66186582
REGISTER_REFLECTION_CLASS_CONST_LONG(class_constant, "IS_PUBLIC", ZEND_ACC_PUBLIC);
66196583
REGISTER_REFLECTION_CLASS_CONST_LONG(class_constant, "IS_PROTECTED", ZEND_ACC_PROTECTED);
66206584
REGISTER_REFLECTION_CLASS_CONST_LONG(class_constant, "IS_PRIVATE", ZEND_ACC_PRIVATE);
66216585

6622-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionExtension", class_ReflectionExtension_methods);
6623-
reflection_init_class_handlers(&_reflection_entry);
6624-
reflection_extension_ptr = zend_register_internal_class(&_reflection_entry);
6625-
zend_class_implements(reflection_extension_ptr, 1, reflector_ptr);
6626-
zend_declare_property_string(reflection_extension_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC);
6627-
6628-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionZendExtension", class_ReflectionZendExtension_methods);
6629-
reflection_init_class_handlers(&_reflection_entry);
6630-
reflection_zend_extension_ptr = zend_register_internal_class(&_reflection_entry);
6631-
zend_class_implements(reflection_zend_extension_ptr, 1, reflector_ptr);
6632-
zend_declare_property_string(reflection_zend_extension_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC);
6633-
6634-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionReference", class_ReflectionReference_methods);
6635-
reflection_init_class_handlers(&_reflection_entry);
6636-
_reflection_entry.ce_flags |= ZEND_ACC_FINAL;
6637-
reflection_reference_ptr = zend_register_internal_class(&_reflection_entry);
6638-
6639-
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionAttribute", class_ReflectionAttribute_methods);
6640-
reflection_init_class_handlers(&_reflection_entry);
6641-
_reflection_entry.ce_flags |= ZEND_ACC_FINAL;
6642-
reflection_attribute_ptr = zend_register_internal_class(&_reflection_entry);
6586+
reflection_extension_ptr = register_class_ReflectionExtension(reflector_ptr);
6587+
reflection_init_class_handlers(reflection_extension_ptr);
6588+
6589+
reflection_zend_extension_ptr = register_class_ReflectionZendExtension(reflector_ptr);
6590+
reflection_init_class_handlers(reflection_zend_extension_ptr);
6591+
6592+
reflection_reference_ptr = register_class_ReflectionReference();
6593+
reflection_init_class_handlers(reflection_reference_ptr);
6594+
6595+
reflection_attribute_ptr = register_class_ReflectionAttribute();
6596+
reflection_init_class_handlers(reflection_attribute_ptr);
66436597

66446598
REGISTER_REFLECTION_CLASS_CONST_LONG(attribute, "IS_INSTANCEOF", REFLECTION_ATTRIBUTE_IS_INSTANCEOF);
66456599

0 commit comments

Comments
 (0)