diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2021-02-12 23:33:09 +0100 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2021-02-14 23:18:28 +0100 |
commit | 6ce70447ac1b83ffa64c98ddcab76f56dfb6695f (patch) | |
tree | 7edf2f5e8b842b5434088da70b95a1b3d285c360 /Zend/zend_attributes.c | |
parent | 31088eef456679b0ead6fe955dded0e9a38928da (diff) | |
download | php-git-6ce70447ac1b83ffa64c98ddcab76f56dfb6695f.tar.gz |
Generate zend class entries based on stubs
Closes GH-6685
Diffstat (limited to 'Zend/zend_attributes.c')
-rw-r--r-- | Zend/zend_attributes.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/Zend/zend_attributes.c b/Zend/zend_attributes.c index 9921e6adb0..7d9cb617f5 100644 --- a/Zend/zend_attributes.c +++ b/Zend/zend_attributes.c @@ -263,15 +263,12 @@ ZEND_API zend_internal_attribute *zend_internal_attribute_get(zend_string *lcnam void zend_register_attribute_ce(void) { zend_internal_attribute *attr; - zend_class_entry ce; - zend_string *str; - zval tmp; zend_hash_init(&internal_attributes, 8, NULL, free_internal_attribute, 1); - INIT_CLASS_ENTRY(ce, "Attribute", class_Attribute_methods); - zend_ce_attribute = zend_register_internal_class(&ce); - zend_ce_attribute->ce_flags |= ZEND_ACC_FINAL; + zend_ce_attribute = register_class_Attribute(); + attr = zend_internal_attribute_register(zend_ce_attribute, ZEND_ATTRIBUTE_TARGET_CLASS); + attr->validator = validate_attribute; zend_declare_class_constant_long(zend_ce_attribute, ZEND_STRL("TARGET_CLASS"), ZEND_ATTRIBUTE_TARGET_CLASS); zend_declare_class_constant_long(zend_ce_attribute, ZEND_STRL("TARGET_FUNCTION"), ZEND_ATTRIBUTE_TARGET_FUNCTION); @@ -281,14 +278,6 @@ void zend_register_attribute_ce(void) zend_declare_class_constant_long(zend_ce_attribute, ZEND_STRL("TARGET_PARAMETER"), ZEND_ATTRIBUTE_TARGET_PARAMETER); zend_declare_class_constant_long(zend_ce_attribute, ZEND_STRL("TARGET_ALL"), ZEND_ATTRIBUTE_TARGET_ALL); zend_declare_class_constant_long(zend_ce_attribute, ZEND_STRL("IS_REPEATABLE"), ZEND_ATTRIBUTE_IS_REPEATABLE); - - ZVAL_UNDEF(&tmp); - str = zend_string_init(ZEND_STRL("flags"), 1); - zend_declare_typed_property(zend_ce_attribute, str, &tmp, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CODE(IS_LONG, 0, 0)); - zend_string_release(str); - - attr = zend_internal_attribute_register(zend_ce_attribute, ZEND_ATTRIBUTE_TARGET_CLASS); - attr->validator = validate_attribute; } void zend_attributes_shutdown(void) |