@@ -38,7 +38,7 @@ ZEND_API void zend_attribute_free(zend_attribute *attr)
38
38
efree (attr );
39
39
}
40
40
41
- ZEND_API zend_attribute * zend_get_attribute (HashTable * attributes , zend_string * lcname , uint32_t offset )
41
+ static zend_attribute * get_attribute (HashTable * attributes , zend_string * lcname , uint32_t offset )
42
42
{
43
43
if (attributes ) {
44
44
zend_attribute * attr ;
@@ -53,7 +53,7 @@ ZEND_API zend_attribute *zend_get_attribute(HashTable *attributes, zend_string *
53
53
return NULL ;
54
54
}
55
55
56
- ZEND_API zend_attribute * zend_get_attribute_str (HashTable * attributes , const char * str , size_t len , uint32_t offset )
56
+ static zend_attribute * get_attribute_str (HashTable * attributes , const char * str , size_t len , uint32_t offset )
57
57
{
58
58
if (attributes ) {
59
59
zend_attribute * attr ;
@@ -70,6 +70,26 @@ ZEND_API zend_attribute *zend_get_attribute_str(HashTable *attributes, const cha
70
70
return NULL ;
71
71
}
72
72
73
+ ZEND_API zend_attribute * zend_get_attribute (HashTable * attributes , zend_string * lcname )
74
+ {
75
+ return get_attribute (attributes , lcname , 0 );
76
+ }
77
+
78
+ ZEND_API zend_attribute * zend_get_attribute_str (HashTable * attributes , const char * str , size_t len )
79
+ {
80
+ return get_attribute_str (attributes , str , len , 0 );
81
+ }
82
+
83
+ ZEND_API zend_attribute * zend_get_parameter_attribute (HashTable * attributes , zend_string * lcname , uint32_t offset )
84
+ {
85
+ return get_attribute (attributes , lcname , offset + 1 );
86
+ }
87
+
88
+ ZEND_API zend_attribute * zend_get_parameter_attribute_str (HashTable * attributes , const char * str , size_t len , uint32_t offset )
89
+ {
90
+ return get_attribute_str (attributes , str , len , offset + 1 );
91
+ }
92
+
73
93
ZEND_API void zend_compiler_attribute_register (zend_class_entry * ce , zend_attributes_internal_validator validator )
74
94
{
75
95
zend_string * lcname = zend_string_tolower_ex (ce -> name , 1 );
0 commit comments