Lines Matching refs:size

46 	long size;  member
78 static void spl_fixedarray_init(spl_fixedarray *array, long size TSRMLS_DC) /* {{{ */ in spl_fixedarray_init()
80 if (size > 0) { in spl_fixedarray_init()
81 array->size = 0; /* reset size in case ecalloc() fails */ in spl_fixedarray_init()
82 array->elements = ecalloc(size, sizeof(zval *)); in spl_fixedarray_init()
83 array->size = size; in spl_fixedarray_init()
86 array->size = 0; in spl_fixedarray_init()
91 static void spl_fixedarray_resize(spl_fixedarray *array, long size TSRMLS_DC) /* {{{ */ in spl_fixedarray_resize()
93 if (size == array->size) { in spl_fixedarray_resize()
99 if (array->size == 0) { in spl_fixedarray_resize()
100 spl_fixedarray_init(array, size TSRMLS_CC); in spl_fixedarray_resize()
105 if (size == 0) { in spl_fixedarray_resize()
108 for (i = 0; i < array->size; i++) { in spl_fixedarray_resize()
118 } else if (size > array->size) { in spl_fixedarray_resize()
119 array->elements = safe_erealloc(array->elements, size, sizeof(zval *), 0); in spl_fixedarray_resize()
120 memset(array->elements + array->size, '\0', sizeof(zval *) * (size - array->size)); in spl_fixedarray_resize()
124 for (i = size; i < array->size; i++) { in spl_fixedarray_resize()
129 array->elements = erealloc(array->elements, sizeof(zval *) * size); in spl_fixedarray_resize()
132 array->size = size; in spl_fixedarray_resize()
139 for (i = 0; i < from->size; i++) { in spl_fixedarray_copy()
157 *n = intern->array->size; in spl_fixedarray_object_get_gc()
176 for (i = 0; i < intern->array->size; i++) { in spl_fixedarray_object_get_properties()
185 if (j > intern->array->size) { in spl_fixedarray_object_get_properties()
186 for (i = intern->array->size; i < j; ++i) { in spl_fixedarray_object_get_properties()
202 for (i = 0; i < intern->array->size; i++) { in spl_fixedarray_object_free_storage()
208 if (intern->array->size > 0 && intern->array->elements) { in spl_fixedarray_object_free_storage()
248 spl_fixedarray_init(intern->array, other->array->size TSRMLS_CC); in spl_fixedarray_object_new_ex()
361 if (index < 0 || intern->array == NULL || index >= intern->array->size) { in spl_fixedarray_object_read_dimension_helper()
421 if (index < 0 || intern->array == NULL || index >= intern->array->size) { in spl_fixedarray_object_write_dimension_helper()
467 if (index < 0 || intern->array == NULL || index >= intern->array->size) { in spl_fixedarray_object_unset_dimension_helper()
508 if (index < 0 || intern->array == NULL || index >= intern->array->size) { in spl_fixedarray_object_has_dimension_helper()
569 *count = intern->array->size; in spl_fixedarray_object_count_elements()
584 long size = 0; in SPL_METHOD() local
586 if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &size)) { in SPL_METHOD()
590 if (size < 0) { in SPL_METHOD()
603 spl_fixedarray_init(intern->array, size TSRMLS_CC); in SPL_METHOD()
622 int size = zend_hash_num_elements(intern_ht); in SPL_METHOD() local
625 spl_fixedarray_init(intern->array, size TSRMLS_CC); in SPL_METHOD()
652 RETURN_LONG(intern->array->size); in SPL_METHOD()
673 for (; i < intern->array->size; i++) { in SPL_METHOD()
786 RETURN_LONG(intern->array->size); in SPL_METHOD()
798 long size; in SPL_METHOD() local
800 if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &size)) { in SPL_METHOD()
804 if (size < 0) { in SPL_METHOD()
814 spl_fixedarray_resize(intern->array, size TSRMLS_CC); in SPL_METHOD()
920 …ent >= 0 && iterator->object->array && iterator->object->current < iterator->object->array->size) { in spl_fixedarray_it_valid()
1018 RETURN_BOOL(intern->current >= 0 && intern->array && intern->current < intern->array->size); in SPL_METHOD()
1095 ZEND_ARG_INFO(0, size)