Lines Matching refs:intern

64 	zend_user_iterator     intern;  member
151 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(obj); in spl_fixedarray_object_get_gc() local
154 *table = intern->array.elements; in spl_fixedarray_object_get_gc()
155 *n = (int)intern->array.size; in spl_fixedarray_object_get_gc()
163 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(obj); in spl_fixedarray_object_get_properties() local
167 if (intern->array.size > 0) { in spl_fixedarray_object_get_properties()
170 for (i = 0; i < intern->array.size; i++) { in spl_fixedarray_object_get_properties()
171 if (!Z_ISUNDEF(intern->array.elements[i])) { in spl_fixedarray_object_get_properties()
172 zend_hash_index_update(ht, i, &intern->array.elements[i]); in spl_fixedarray_object_get_properties()
173 Z_TRY_ADDREF(intern->array.elements[i]); in spl_fixedarray_object_get_properties()
178 if (j > intern->array.size) { in spl_fixedarray_object_get_properties()
179 for (i = intern->array.size; i < j; ++i) { in spl_fixedarray_object_get_properties()
191 spl_fixedarray_object *intern = spl_fixed_array_from_obj(object); in spl_fixedarray_object_free_storage() local
194 if (intern->array.size > 0) { in spl_fixedarray_object_free_storage()
195 for (i = 0; i < intern->array.size; i++) { in spl_fixedarray_object_free_storage()
196 zval_ptr_dtor(&(intern->array.elements[i])); in spl_fixedarray_object_free_storage()
199 if (intern->array.size > 0 && intern->array.elements) { in spl_fixedarray_object_free_storage()
200 efree(intern->array.elements); in spl_fixedarray_object_free_storage()
204 zend_object_std_dtor(&intern->std); in spl_fixedarray_object_free_storage()
212 spl_fixedarray_object *intern; in spl_fixedarray_object_new_ex() local
217 intern = zend_object_alloc(sizeof(spl_fixedarray_object), parent); in spl_fixedarray_object_new_ex()
219 zend_object_std_init(&intern->std, class_type); in spl_fixedarray_object_new_ex()
220 object_properties_init(&intern->std, class_type); in spl_fixedarray_object_new_ex()
222 intern->current = 0; in spl_fixedarray_object_new_ex()
223 intern->flags = 0; in spl_fixedarray_object_new_ex()
227 intern->ce_get_iterator = other->ce_get_iterator; in spl_fixedarray_object_new_ex()
228 spl_fixedarray_init(&intern->array, other->array.size); in spl_fixedarray_object_new_ex()
229 spl_fixedarray_copy(&intern->array, &other->array); in spl_fixedarray_object_new_ex()
234 intern->std.handlers = &spl_handler_SplFixedArray; in spl_fixedarray_object_new_ex()
256 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_REWIND; in spl_fixedarray_object_new_ex()
259 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_VALID; in spl_fixedarray_object_new_ex()
262 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_KEY; in spl_fixedarray_object_new_ex()
265 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_CURRENT; in spl_fixedarray_object_new_ex()
268 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_NEXT; in spl_fixedarray_object_new_ex()
271intern->fptr_offset_get = zend_hash_str_find_ptr(&class_type->function_table, "offsetget", sizeof(… in spl_fixedarray_object_new_ex()
272 if (intern->fptr_offset_get->common.scope == parent) { in spl_fixedarray_object_new_ex()
273 intern->fptr_offset_get = NULL; in spl_fixedarray_object_new_ex()
275intern->fptr_offset_set = zend_hash_str_find_ptr(&class_type->function_table, "offsetset", sizeof(… in spl_fixedarray_object_new_ex()
276 if (intern->fptr_offset_set->common.scope == parent) { in spl_fixedarray_object_new_ex()
277 intern->fptr_offset_set = NULL; in spl_fixedarray_object_new_ex()
279intern->fptr_offset_has = zend_hash_str_find_ptr(&class_type->function_table, "offsetexists", size… in spl_fixedarray_object_new_ex()
280 if (intern->fptr_offset_has->common.scope == parent) { in spl_fixedarray_object_new_ex()
281 intern->fptr_offset_has = NULL; in spl_fixedarray_object_new_ex()
283intern->fptr_offset_del = zend_hash_str_find_ptr(&class_type->function_table, "offsetunset", sizeo… in spl_fixedarray_object_new_ex()
284 if (intern->fptr_offset_del->common.scope == parent) { in spl_fixedarray_object_new_ex()
285 intern->fptr_offset_del = NULL; in spl_fixedarray_object_new_ex()
287intern->fptr_count = zend_hash_str_find_ptr(&class_type->function_table, "count", sizeof("count") … in spl_fixedarray_object_new_ex()
288 if (intern->fptr_count->common.scope == parent) { in spl_fixedarray_object_new_ex()
289 intern->fptr_count = NULL; in spl_fixedarray_object_new_ex()
293 return &intern->std; in spl_fixedarray_object_new_ex()
317 static inline zval *spl_fixedarray_object_read_dimension_helper(spl_fixedarray_object *intern, zval… in spl_fixedarray_object_read_dimension_helper() argument
334 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_read_dimension_helper()
337 } else if (Z_ISUNDEF(intern->array.elements[index])) { in spl_fixedarray_object_read_dimension_helper()
340 return &intern->array.elements[index]; in spl_fixedarray_object_read_dimension_helper()
349 spl_fixedarray_object *intern; in spl_fixedarray_object_read_dimension() local
351 intern = Z_SPLFIXEDARRAY_P(object); in spl_fixedarray_object_read_dimension()
357 if (intern->fptr_offset_get) { in spl_fixedarray_object_read_dimension()
365 …zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_get, "offsetGet", rv, … in spl_fixedarray_object_read_dimension()
373 return spl_fixedarray_object_read_dimension_helper(intern, offset); in spl_fixedarray_object_read_dimension()
377 static inline void spl_fixedarray_object_write_dimension_helper(spl_fixedarray_object *intern, zval… in spl_fixedarray_object_write_dimension_helper() argument
393 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_write_dimension_helper()
398 zval *ptr = &(intern->array.elements[index]); in spl_fixedarray_object_write_dimension_helper()
409 spl_fixedarray_object *intern; in spl_fixedarray_object_write_dimension() local
412 intern = Z_SPLFIXEDARRAY_P(object); in spl_fixedarray_object_write_dimension()
414 if (intern->fptr_offset_set) { in spl_fixedarray_object_write_dimension()
422 …zend_call_method_with_2_params(object, intern->std.ce, &intern->fptr_offset_set, "offsetSet", NULL… in spl_fixedarray_object_write_dimension()
428 spl_fixedarray_object_write_dimension_helper(intern, offset, value); in spl_fixedarray_object_write_dimension()
432 static inline void spl_fixedarray_object_unset_dimension_helper(spl_fixedarray_object *intern, zval… in spl_fixedarray_object_unset_dimension_helper() argument
442 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_unset_dimension_helper()
446 zval_ptr_dtor(&(intern->array.elements[index])); in spl_fixedarray_object_unset_dimension_helper()
447 ZVAL_UNDEF(&intern->array.elements[index]); in spl_fixedarray_object_unset_dimension_helper()
454 spl_fixedarray_object *intern; in spl_fixedarray_object_unset_dimension() local
456 intern = Z_SPLFIXEDARRAY_P(object); in spl_fixedarray_object_unset_dimension()
458 if (intern->fptr_offset_del) { in spl_fixedarray_object_unset_dimension()
460 …zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_del, "offsetUnset", NU… in spl_fixedarray_object_unset_dimension()
465 spl_fixedarray_object_unset_dimension_helper(intern, offset); in spl_fixedarray_object_unset_dimension()
470 static inline int spl_fixedarray_object_has_dimension_helper(spl_fixedarray_object *intern, zval *o… in spl_fixedarray_object_has_dimension_helper() argument
481 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_has_dimension_helper()
484 if (Z_ISUNDEF(intern->array.elements[index])) { in spl_fixedarray_object_has_dimension_helper()
487 if (zend_is_true(&intern->array.elements[index])) { in spl_fixedarray_object_has_dimension_helper()
503 spl_fixedarray_object *intern; in spl_fixedarray_object_has_dimension() local
505 intern = Z_SPLFIXEDARRAY_P(object); in spl_fixedarray_object_has_dimension()
507 if (intern->fptr_offset_has) { in spl_fixedarray_object_has_dimension()
512 …zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_has, "offsetExists", &… in spl_fixedarray_object_has_dimension()
519 return spl_fixedarray_object_has_dimension_helper(intern, offset, check_empty); in spl_fixedarray_object_has_dimension()
525 spl_fixedarray_object *intern; in spl_fixedarray_object_count_elements() local
527 intern = Z_SPLFIXEDARRAY_P(object); in spl_fixedarray_object_count_elements()
528 if (intern->fptr_count) { in spl_fixedarray_object_count_elements()
530 zend_call_method_with_0_params(object, intern->std.ce, &intern->fptr_count, "count", &rv); in spl_fixedarray_object_count_elements()
538 *count = intern->array.size; in spl_fixedarray_object_count_elements()
549 spl_fixedarray_object *intern; in SPL_METHOD() local
561 intern = Z_SPLFIXEDARRAY_P(object); in SPL_METHOD()
563 if (intern->array.size > 0) { in SPL_METHOD()
568 spl_fixedarray_init(&intern->array, size); in SPL_METHOD()
576 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD() local
584 if (intern->array.size == 0) { in SPL_METHOD()
588 spl_fixedarray_init(&intern->array, size); in SPL_METHOD()
591 ZVAL_COPY(&intern->array.elements[index], data); in SPL_METHOD()
607 spl_fixedarray_object *intern; in SPL_METHOD() local
613 intern = Z_SPLFIXEDARRAY_P(object); in SPL_METHOD()
614 RETURN_LONG(intern->array.size); in SPL_METHOD()
622 spl_fixedarray_object *intern; in SPL_METHOD() local
628 intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD()
630 if (intern->array.size > 0) { in SPL_METHOD()
634 for (; i < intern->array.size; i++) { in SPL_METHOD()
635 if (!Z_ISUNDEF(intern->array.elements[i])) { in SPL_METHOD()
636 zend_hash_index_update(Z_ARRVAL_P(return_value), i, &intern->array.elements[i]); in SPL_METHOD()
637 Z_TRY_ADDREF(intern->array.elements[i]); in SPL_METHOD()
654 spl_fixedarray_object *intern; in SPL_METHOD() local
708 intern = Z_SPLFIXEDARRAY_P(return_value); in SPL_METHOD()
709 intern->array = array; in SPL_METHOD()
718 spl_fixedarray_object *intern; in SPL_METHOD() local
724 intern = Z_SPLFIXEDARRAY_P(object); in SPL_METHOD()
725 RETURN_LONG(intern->array.size); in SPL_METHOD()
734 spl_fixedarray_object *intern; in SPL_METHOD() local
746 intern = Z_SPLFIXEDARRAY_P(object); in SPL_METHOD()
748 spl_fixedarray_resize(&intern->array, size); in SPL_METHOD()
758 spl_fixedarray_object *intern; in SPL_METHOD() local
764 intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD()
766 RETURN_BOOL(spl_fixedarray_object_has_dimension_helper(intern, zindex, 0)); in SPL_METHOD()
774 spl_fixedarray_object *intern; in SPL_METHOD() local
780 intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD()
781 value = spl_fixedarray_object_read_dimension_helper(intern, zindex); in SPL_METHOD()
795 spl_fixedarray_object *intern; in SPL_METHOD() local
801 intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD()
802 spl_fixedarray_object_write_dimension_helper(intern, zindex, value); in SPL_METHOD()
811 spl_fixedarray_object *intern; in SPL_METHOD() local
817 intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD()
818 spl_fixedarray_object_unset_dimension_helper(intern, zindex); in SPL_METHOD()
827 zval_ptr_dtor(&iterator->intern.it.data); in spl_fixedarray_it_dtor()
910 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD() local
916 RETURN_LONG(intern->current); in SPL_METHOD()
924 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD() local
930 intern->current++; in SPL_METHOD()
938 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD() local
944 RETURN_BOOL(intern->current >= 0 && intern->current < intern->array.size); in SPL_METHOD()
952 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD() local
958 intern->current = 0; in SPL_METHOD()
967 spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); in SPL_METHOD() local
973 ZVAL_LONG(&zindex, intern->current); in SPL_METHOD()
975 value = spl_fixedarray_object_read_dimension_helper(intern, &zindex); in SPL_METHOD()
1010 ZVAL_OBJ(&iterator->intern.it.data, Z_OBJ_P(object)); in spl_fixedarray_get_iterator()
1011 iterator->intern.it.funcs = &spl_fixedarray_it_funcs; in spl_fixedarray_get_iterator()
1012 iterator->intern.ce = ce; in spl_fixedarray_get_iterator()
1013 ZVAL_UNDEF(&iterator->intern.value); in spl_fixedarray_get_iterator()
1015 return &iterator->intern.it; in spl_fixedarray_get_iterator()