Lines Matching refs:size

44 	zend_long size;  member
87 ZEND_ASSERT(array->size > 0); in spl_fixedarray_empty()
90 ZEND_ASSERT(array->size == 0); in spl_fixedarray_empty()
96 array->size = 0; in spl_fixedarray_default_ctor()
111 static void spl_fixedarray_init(spl_fixedarray *array, zend_long size) in spl_fixedarray_init() argument
113 if (size > 0) { in spl_fixedarray_init()
114 array->size = 0; /* reset size in case ecalloc() fails */ in spl_fixedarray_init()
115 array->elements = safe_emalloc(size, sizeof(zval), 0); in spl_fixedarray_init()
116 array->size = size; in spl_fixedarray_init()
118 spl_fixedarray_init_elems(array, 0, size); in spl_fixedarray_init()
131 ZEND_ASSERT(array->size - offset >= end - begin); in spl_fixedarray_copy_range()
141 zend_long size = from->size; in spl_fixedarray_copy_ctor() local
142 spl_fixedarray_init(to, size); in spl_fixedarray_copy_ctor()
143 if (size != 0) { in spl_fixedarray_copy_ctor()
144 zval *begin = from->elements, *end = from->elements + size; in spl_fixedarray_copy_ctor()
154 array->size = from; in spl_fixedarray_dtor_range()
167 zval *begin = array->elements, *end = array->elements + array->size; in spl_fixedarray_dtor()
169 array->size = 0; in spl_fixedarray_dtor()
177 static void spl_fixedarray_resize(spl_fixedarray *array, zend_long size) in spl_fixedarray_resize() argument
179 if (size == array->size) { in spl_fixedarray_resize()
186 if (array->size == 0) { in spl_fixedarray_resize()
187 spl_fixedarray_init(array, size); in spl_fixedarray_resize()
194 array->cached_resize = size; in spl_fixedarray_resize()
197 array->cached_resize = size; in spl_fixedarray_resize()
200 if (size == 0) { in spl_fixedarray_resize()
203 array->size = 0; in spl_fixedarray_resize()
204 } else if (size > array->size) { in spl_fixedarray_resize()
205 array->elements = safe_erealloc(array->elements, size, sizeof(zval), 0); in spl_fixedarray_resize()
206 spl_fixedarray_init_elems(array, array->size, size); in spl_fixedarray_resize()
207 array->size = size; in spl_fixedarray_resize()
210 spl_fixedarray_dtor_range(array, size, array->size); in spl_fixedarray_resize()
211 array->elements = erealloc(array->elements, sizeof(zval) * size); in spl_fixedarray_resize()
217 if (cached_resize != size) { in spl_fixedarray_resize()
228 *n = (int)intern->array.size; in spl_fixedarray_object_get_gc()
261 for (zend_long i = 0; i < intern->array.size; i++) { in spl_fixedarray_object_get_properties()
265 if (j > intern->array.size) { in spl_fixedarray_object_get_properties()
266 for (zend_long i = intern->array.size; i < j; ++i) { in spl_fixedarray_object_get_properties()
408 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_read_dimension_helper()
463 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_write_dimension_helper()
506 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_unset_dimension_helper()
540 if (index < 0 || index >= intern->array.size) { in spl_fixedarray_object_has_dimension_helper()
585 *count = intern->array.size; in spl_fixedarray_object_count_elements()
594 zend_long size = 0; in PHP_METHOD() local
596 if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &size) == FAILURE) { in PHP_METHOD()
600 if (size < 0) { in PHP_METHOD()
612 spl_fixedarray_init(&intern->array, size); in PHP_METHOD()
625 if (intern->array.size == 0) { in PHP_METHOD()
627 int size = zend_hash_num_elements(intern_ht); in PHP_METHOD() local
629 spl_fixedarray_init(&intern->array, size); in PHP_METHOD()
652 RETURN_LONG(intern->array.size); in PHP_METHOD()
667 for (zend_long i = 0; i < intern->array.size; i++) { in PHP_METHOD()
748 RETURN_LONG(intern->array.size); in PHP_METHOD()
755 zend_long size; in PHP_METHOD() local
757 if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &size) == FAILURE) { in PHP_METHOD()
761 if (size < 0) { in PHP_METHOD()
768 spl_fixedarray_resize(&intern->array, size); in PHP_METHOD()
852 array_init_size(return_value, intern->array.size); in PHP_METHOD()
853 for (zend_long i = 0; i < intern->array.size; i++) { in PHP_METHOD()
874 if (iterator->current >= 0 && iterator->current < object->array.size) { in spl_fixedarray_it_valid()