Lines Matching refs:attr

38 uint32_t zend_attribute_attribute_get_flags(zend_attribute *attr, zend_class_entry *scope)  in zend_attribute_attribute_get_flags()  argument
41 if (attr->argc > 0) { in zend_attribute_attribute_get_flags()
44 if (FAILURE == zend_get_attribute_value(&flags, attr, 0, scope)) { in zend_attribute_attribute_get_flags()
71 zend_attribute *attr, uint32_t target, zend_class_entry *scope) in validate_allow_dynamic_properties() argument
152 zend_attribute *attr; in get_attribute() local
154 ZEND_HASH_PACKED_FOREACH_PTR(attributes, attr) { in get_attribute()
155 if (attr->offset == offset && zend_string_equals(attr->lcname, lcname)) { in get_attribute()
156 return attr; in get_attribute()
167 zend_attribute *attr; in get_attribute_str() local
169 ZEND_HASH_PACKED_FOREACH_PTR(attributes, attr) { in get_attribute_str()
170 if (attr->offset == offset && zend_string_equals_cstr(attr->lcname, str, len)) { in get_attribute_str()
171 return attr; in get_attribute_str()
199 ZEND_API zend_result zend_get_attribute_value(zval *ret, zend_attribute *attr, uint32_t i, zend_cla… in zend_get_attribute_value() argument
201 if (i >= attr->argc) { in zend_get_attribute_value()
205 ZVAL_COPY_OR_DUP(ret, &attr->args[i].value); in zend_get_attribute_value()
243 ZEND_API bool zend_is_attribute_repeated(HashTable *attributes, zend_attribute *attr) in zend_is_attribute_repeated() argument
248 if (other != attr && other->offset == attr->offset) { in zend_is_attribute_repeated()
249 if (zend_string_equals(other->lcname, attr->lcname)) { in zend_is_attribute_repeated()
260 zend_attribute *attr = Z_PTR_P(v); in attr_free() local
261 bool persistent = attr->flags & ZEND_ATTRIBUTE_PERSISTENT; in attr_free()
263 zend_string_release(attr->name); in attr_free()
264 zend_string_release(attr->lcname); in attr_free()
266 for (uint32_t i = 0; i < attr->argc; i++) { in attr_free()
267 if (attr->args[i].name) { in attr_free()
268 zend_string_release(attr->args[i].name); in attr_free()
271 zval_internal_ptr_dtor(&attr->args[i].value); in attr_free()
273 zval_ptr_dtor(&attr->args[i].value); in attr_free()
277 pefree(attr, persistent); in attr_free()
288 zend_attribute *attr = pemalloc(ZEND_ATTRIBUTE_SIZE(argc), persistent); in zend_add_attribute() local
291 attr->name = zend_string_copy(name); in zend_add_attribute()
293 attr->name = zend_string_dup(name, persistent); in zend_add_attribute()
296 attr->lcname = zend_string_tolower_ex(attr->name, persistent); in zend_add_attribute()
297 attr->flags = flags; in zend_add_attribute()
298 attr->lineno = lineno; in zend_add_attribute()
299 attr->offset = offset; in zend_add_attribute()
300 attr->argc = argc; in zend_add_attribute()
304 attr->args[i].name = NULL; in zend_add_attribute()
305 ZVAL_UNDEF(&attr->args[i].value); in zend_add_attribute()
308 zend_hash_next_index_insert_ptr(*attributes, attr); in zend_add_attribute()
310 return attr; in zend_add_attribute()
321 zend_attribute *attr; in zend_mark_internal_attribute() local
327 ZEND_HASH_FOREACH_PTR(ce->attributes, attr) { in zend_mark_internal_attribute()
328 if (zend_string_equals(attr->name, zend_ce_attribute->name)) { in zend_mark_internal_attribute()
331 internal_attr->flags = Z_LVAL(attr->args[0].value); in zend_mark_internal_attribute()
347 zend_attribute *attr = zend_add_class_attribute(ce, zend_ce_attribute->name, 1); in zend_internal_attribute_register() local
348 ZVAL_LONG(&attr->args[0].value, flags); in zend_internal_attribute_register()
360 zend_internal_attribute *attr; in zend_register_attribute_ce() local
365 attr = zend_mark_internal_attribute(zend_ce_attribute); in zend_register_attribute_ce()
371 attr = zend_mark_internal_attribute(zend_ce_allow_dynamic_properties); in zend_register_attribute_ce()
372 attr->validator = validate_allow_dynamic_properties; in zend_register_attribute_ce()