Skip to content

Commit a9d94bb

Browse files
committed
Removed ZEND_API from register ce function.
1 parent bd4eed0 commit a9d94bb

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

Zend/zend_attributes.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,20 @@ void zend_attribute_validate_phpcompilerattribute(zend_attribute *attr, int targ
1919
zend_error(E_COMPILE_ERROR, "The PhpCompilerAttribute can only be used by internal classes, use PhpAttribute instead");
2020
}
2121

22-
ZEND_API void zend_register_attribute_ce(void)
22+
ZEND_API zend_attributes_internal_validator zend_attribute_get_validator(zend_string *lcname)
23+
{
24+
return zend_hash_find_ptr(&internal_validators, lcname);
25+
}
26+
27+
ZEND_API void zend_compiler_attribute_register(zend_class_entry *ce, zend_attributes_internal_validator validator)
28+
{
29+
zend_string *lcname = zend_string_tolower_ex(ce->name, 1);
30+
31+
zend_hash_update_ptr(&internal_validators, lcname, validator);
32+
zend_string_release(lcname);
33+
}
34+
35+
void zend_register_attribute_ce(void)
2336
{
2437
zend_hash_init(&internal_validators, 8, NULL, NULL, 1);
2538

@@ -37,16 +50,3 @@ ZEND_API void zend_register_attribute_ce(void)
3750

3851
zend_compiler_attribute_register(zend_ce_php_compiler_attribute, zend_attribute_validate_phpcompilerattribute);
3952
}
40-
41-
ZEND_API zend_attributes_internal_validator zend_attribute_get_validator(zend_string *lcname)
42-
{
43-
return zend_hash_find_ptr(&internal_validators, lcname);
44-
}
45-
46-
ZEND_API void zend_compiler_attribute_register(zend_class_entry *ce, zend_attributes_internal_validator validator)
47-
{
48-
zend_string *lcname = zend_string_tolower_ex(ce->name, 1);
49-
50-
zend_hash_update_ptr(&internal_validators, lcname, validator);
51-
zend_string_release(lcname);
52-
}

Zend/zend_attributes.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ static zend_always_inline zend_attribute *zend_get_attribute_str(HashTable *attr
7474

7575
ZEND_API void zend_compiler_attribute_register(zend_class_entry *ce, zend_attributes_internal_validator validator);
7676
ZEND_API zend_attributes_internal_validator zend_attribute_get_validator(zend_string *lcname);
77-
ZEND_API void zend_register_attribute_ce(void);
77+
78+
void zend_register_attribute_ce(void);
7879

7980
END_EXTERN_C()
8081

0 commit comments

Comments
 (0)