Lines Matching refs:intern

66 	zend_user_iterator     intern;  member
148 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(obj); in spl_fixedarray_object_get_gc() local
151 *table = intern->array.elements; in spl_fixedarray_object_get_gc()
152 *n = (int)intern->array.size; in spl_fixedarray_object_get_gc()
160 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(obj); in spl_fixedarray_object_get_properties() local
164 if (intern->array.size > 0) { in spl_fixedarray_object_get_properties()
167 for (i = 0; i < intern->array.size; i++) { in spl_fixedarray_object_get_properties()
168 if (!Z_ISUNDEF(intern->array.elements[i])) { in spl_fixedarray_object_get_properties()
169 zend_hash_index_update(ht, i, &intern->array.elements[i]); in spl_fixedarray_object_get_properties()
170 if (Z_REFCOUNTED(intern->array.elements[i])){ in spl_fixedarray_object_get_properties()
171 Z_ADDREF(intern->array.elements[i]); in spl_fixedarray_object_get_properties()
177 if (j > intern->array.size) { in spl_fixedarray_object_get_properties()
178 for (i = intern->array.size; i < j; ++i) { in spl_fixedarray_object_get_properties()
190 spl_fixedarray_object *intern = spl_fixed_array_from_obj(object); in spl_fixedarray_object_free_storage() local
193 if (intern->array.size > 0) { in spl_fixedarray_object_free_storage()
194 for (i = 0; i < intern->array.size; i++) { in spl_fixedarray_object_free_storage()
195 zval_ptr_dtor(&(intern->array.elements[i])); in spl_fixedarray_object_free_storage()
198 if (intern->array.size > 0 && intern->array.elements) { in spl_fixedarray_object_free_storage()
199 efree(intern->array.elements); in spl_fixedarray_object_free_storage()
203 zend_object_std_dtor(&intern->std); in spl_fixedarray_object_free_storage()
211 spl_fixedarray_object *intern; in spl_fixedarray_object_new_ex() local
215 intern = ecalloc(1, sizeof(spl_fixedarray_object) + zend_object_properties_size(parent)); in spl_fixedarray_object_new_ex()
217 zend_object_std_init(&intern->std, class_type); in spl_fixedarray_object_new_ex()
218 object_properties_init(&intern->std, class_type); in spl_fixedarray_object_new_ex()
220 intern->current = 0; in spl_fixedarray_object_new_ex()
221 intern->flags = 0; in spl_fixedarray_object_new_ex()
225 intern->ce_get_iterator = other->ce_get_iterator; in spl_fixedarray_object_new_ex()
226 spl_fixedarray_init(&intern->array, other->array.size); in spl_fixedarray_object_new_ex()
227 spl_fixedarray_copy(&intern->array, &other->array); in spl_fixedarray_object_new_ex()
232 intern->std.handlers = &spl_handler_SplFixedArray; in spl_fixedarray_object_new_ex()
254 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_REWIND; in spl_fixedarray_object_new_ex()
257 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_VALID; in spl_fixedarray_object_new_ex()
260 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_KEY; in spl_fixedarray_object_new_ex()
263 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_CURRENT; in spl_fixedarray_object_new_ex()
266 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_NEXT; in spl_fixedarray_object_new_ex()
269intern->fptr_offset_get = zend_hash_str_find_ptr(&class_type->function_table, "offsetget", sizeof(… in spl_fixedarray_object_new_ex()
270 if (intern->fptr_offset_get->common.scope == parent) { in spl_fixedarray_object_new_ex()
271 intern->fptr_offset_get = NULL; in spl_fixedarray_object_new_ex()
273intern->fptr_offset_set = zend_hash_str_find_ptr(&class_type->function_table, "offsetset", sizeof(… in spl_fixedarray_object_new_ex()
274 if (intern->fptr_offset_set->common.scope == parent) { in spl_fixedarray_object_new_ex()
275 intern->fptr_offset_set = NULL; in spl_fixedarray_object_new_ex()
277intern->fptr_offset_has = zend_hash_str_find_ptr(&class_type->function_table, "offsetexists", size… in spl_fixedarray_object_new_ex()
278 if (intern->fptr_offset_has->common.scope == parent) { in spl_fixedarray_object_new_ex()
279 intern->fptr_offset_has = NULL; in spl_fixedarray_object_new_ex()
281intern->fptr_offset_del = zend_hash_str_find_ptr(&class_type->function_table, "offsetunset", sizeo… in spl_fixedarray_object_new_ex()
282 if (intern->fptr_offset_del->common.scope == parent) { in spl_fixedarray_object_new_ex()
283 intern->fptr_offset_del = NULL; in spl_fixedarray_object_new_ex()
285intern->fptr_count = zend_hash_str_find_ptr(&class_type->function_table, "count", sizeof("count") … in spl_fixedarray_object_new_ex()
286 if (intern->fptr_count->common.scope == parent) { in spl_fixedarray_object_new_ex()
287 intern->fptr_count = NULL; in spl_fixedarray_object_new_ex()
291 return &intern->std; in spl_fixedarray_object_new_ex()
315 static inline zval *spl_fixedarray_object_read_dimension_helper(spl_fixedarray_object *intern, zval… in spl_fixedarray_object_read_dimension_helper() argument
332 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_read_dimension_helper()
335 } else if (Z_ISUNDEF(intern->array.elements[index])) { in spl_fixedarray_object_read_dimension_helper()
338 return &intern->array.elements[index]; in spl_fixedarray_object_read_dimension_helper()
345 spl_fixedarray_object *intern; in spl_fixedarray_object_read_dimension() local
347 intern = Z_SPLFIXEDARRAY_P(object); in spl_fixedarray_object_read_dimension()
349 if (type == BP_VAR_IS && intern->fptr_offset_has) { in spl_fixedarray_object_read_dimension()
351 …zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_has, "offsetexists", r… in spl_fixedarray_object_read_dimension()
364 if (intern->fptr_offset_get) { in spl_fixedarray_object_read_dimension()
372 …zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_get, "offsetGet", rv, … in spl_fixedarray_object_read_dimension()
380 return spl_fixedarray_object_read_dimension_helper(intern, offset); in spl_fixedarray_object_read_dimension()
384 static inline void spl_fixedarray_object_write_dimension_helper(spl_fixedarray_object *intern, zval… in spl_fixedarray_object_write_dimension_helper() argument
400 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_write_dimension_helper()
404 if (!Z_ISUNDEF(intern->array.elements[index])) { in spl_fixedarray_object_write_dimension_helper()
405 zval_ptr_dtor(&(intern->array.elements[index])); in spl_fixedarray_object_write_dimension_helper()
408 ZVAL_COPY(&intern->array.elements[index], value); in spl_fixedarray_object_write_dimension_helper()
415 spl_fixedarray_object *intern; in spl_fixedarray_object_write_dimension() local
418 intern = Z_SPLFIXEDARRAY_P(object); in spl_fixedarray_object_write_dimension()
420 if (intern->fptr_offset_set) { in spl_fixedarray_object_write_dimension()
428 …zend_call_method_with_2_params(object, intern->std.ce, &intern->fptr_offset_set, "offsetSet", NULL… in spl_fixedarray_object_write_dimension()
434 spl_fixedarray_object_write_dimension_helper(intern, offset, value); in spl_fixedarray_object_write_dimension()
438 static inline void spl_fixedarray_object_unset_dimension_helper(spl_fixedarray_object *intern, zval… in spl_fixedarray_object_unset_dimension_helper() argument
448 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_unset_dimension_helper()
452 zval_ptr_dtor(&(intern->array.elements[index])); in spl_fixedarray_object_unset_dimension_helper()
453 ZVAL_UNDEF(&intern->array.elements[index]); in spl_fixedarray_object_unset_dimension_helper()
460 spl_fixedarray_object *intern; in spl_fixedarray_object_unset_dimension() local
462 intern = Z_SPLFIXEDARRAY_P(object); in spl_fixedarray_object_unset_dimension()
464 if (intern->fptr_offset_del) { in spl_fixedarray_object_unset_dimension()
466 …zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_del, "offsetUnset", NU… in spl_fixedarray_object_unset_dimension()
471 spl_fixedarray_object_unset_dimension_helper(intern, offset); in spl_fixedarray_object_unset_dimension()
476 static inline int spl_fixedarray_object_has_dimension_helper(spl_fixedarray_object *intern, zval *o… in spl_fixedarray_object_has_dimension_helper() argument
487 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_has_dimension_helper()
490 if (Z_ISUNDEF(intern->array.elements[index])) { in spl_fixedarray_object_has_dimension_helper()
493 if (zend_is_true(&intern->array.elements[index])) { in spl_fixedarray_object_has_dimension_helper()
509 spl_fixedarray_object *intern; in spl_fixedarray_object_has_dimension() local
511 intern = Z_SPLFIXEDARRAY_P(object); in spl_fixedarray_object_has_dimension()
513 if (intern->fptr_offset_has) { in spl_fixedarray_object_has_dimension()
516 …zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_has, "offsetExists", &… in spl_fixedarray_object_has_dimension()
526 return spl_fixedarray_object_has_dimension_helper(intern, offset, check_empty); in spl_fixedarray_object_has_dimension()
532 spl_fixedarray_object *intern; in spl_fixedarray_object_count_elements() local
534 intern = Z_SPLFIXEDARRAY_P(object); in spl_fixedarray_object_count_elements()
535 if (intern->fptr_count) { in spl_fixedarray_object_count_elements()
537 zend_call_method_with_0_params(object, intern->std.ce, &intern->fptr_count, "count", &rv); in spl_fixedarray_object_count_elements()
545 *count = intern->array.size; in spl_fixedarray_object_count_elements()
556 spl_fixedarray_object *intern; in SPL_METHOD() local
568 intern = Z_SPLFIXEDARRAY_P(object); in SPL_METHOD()
570 if (intern->array.size > 0) { in SPL_METHOD()
575 spl_fixedarray_init(&intern->array, size); in SPL_METHOD()
583 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD() local
591 if (intern->array.size == 0) { in SPL_METHOD()
595 spl_fixedarray_init(&intern->array, size); in SPL_METHOD()
601 ZVAL_COPY_VALUE(&intern->array.elements[index], data); in SPL_METHOD()
617 spl_fixedarray_object *intern; in SPL_METHOD() local
623 intern = Z_SPLFIXEDARRAY_P(object); in SPL_METHOD()
624 RETURN_LONG(intern->array.size); in SPL_METHOD()
632 spl_fixedarray_object *intern; in SPL_METHOD() local
638 intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD()
641 if (intern->array.size > 0) { in SPL_METHOD()
643 for (; i < intern->array.size; i++) { in SPL_METHOD()
644 if (!Z_ISUNDEF(intern->array.elements[i])) { in SPL_METHOD()
645 zend_hash_index_update(Z_ARRVAL_P(return_value), i, &intern->array.elements[i]); in SPL_METHOD()
646 if (Z_REFCOUNTED(intern->array.elements[i])) { in SPL_METHOD()
647 Z_ADDREF(intern->array.elements[i]); in SPL_METHOD()
663 spl_fixedarray_object *intern; in SPL_METHOD() local
719 intern = Z_SPLFIXEDARRAY_P(return_value); in SPL_METHOD()
720 intern->array = array; in SPL_METHOD()
729 spl_fixedarray_object *intern; in SPL_METHOD() local
735 intern = Z_SPLFIXEDARRAY_P(object); in SPL_METHOD()
736 RETURN_LONG(intern->array.size); in SPL_METHOD()
745 spl_fixedarray_object *intern; in SPL_METHOD() local
757 intern = Z_SPLFIXEDARRAY_P(object); in SPL_METHOD()
759 spl_fixedarray_resize(&intern->array, size); in SPL_METHOD()
769 spl_fixedarray_object *intern; in SPL_METHOD() local
775 intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD()
777 RETURN_BOOL(spl_fixedarray_object_has_dimension_helper(intern, zindex, 0)); in SPL_METHOD()
785 spl_fixedarray_object *intern; in SPL_METHOD() local
791 intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD()
792 value = spl_fixedarray_object_read_dimension_helper(intern, zindex); in SPL_METHOD()
807 spl_fixedarray_object *intern; in SPL_METHOD() local
813 intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD()
814 spl_fixedarray_object_write_dimension_helper(intern, zindex, value); in SPL_METHOD()
823 spl_fixedarray_object *intern; in SPL_METHOD() local
829 intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD()
830 spl_fixedarray_object_unset_dimension_helper(intern, zindex); in SPL_METHOD()
839 zval_ptr_dtor(&iterator->intern.it.data); in spl_fixedarray_it_dtor()
923 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD() local
929 RETURN_LONG(intern->current); in SPL_METHOD()
937 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD() local
943 intern->current++; in SPL_METHOD()
951 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD() local
957 RETURN_BOOL(intern->current >= 0 && intern->current < intern->array.size); in SPL_METHOD()
965 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD() local
971 intern->current = 0; in SPL_METHOD()
980 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(getThis()); in SPL_METHOD() local
986 ZVAL_LONG(&zindex, intern->current); in SPL_METHOD()
988 value = spl_fixedarray_object_read_dimension_helper(intern, &zindex); in SPL_METHOD()
1025 ZVAL_COPY(&iterator->intern.it.data, object); in spl_fixedarray_get_iterator()
1026 iterator->intern.it.funcs = &spl_fixedarray_it_funcs; in spl_fixedarray_get_iterator()
1027 iterator->intern.ce = ce; in spl_fixedarray_get_iterator()
1028 ZVAL_UNDEF(&iterator->intern.value); in spl_fixedarray_get_iterator()
1030 return &iterator->intern.it; in spl_fixedarray_get_iterator()