Lines Matching refs:intern

67 	zend_user_iterator     intern;  member
152 …spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(obj TSRMLS_C… in spl_fixedarray_object_get_gc() local
155 if (intern->array) { in spl_fixedarray_object_get_gc()
156 *table = intern->array->elements; in spl_fixedarray_object_get_gc()
157 *n = intern->array->size; in spl_fixedarray_object_get_gc()
169 …spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(obj TSRMLS_C… in spl_fixedarray_object_get_properties() local
173 if (intern->array) { in spl_fixedarray_object_get_properties()
176 for (i = 0; i < intern->array->size; i++) { in spl_fixedarray_object_get_properties()
177 if (intern->array->elements[i]) { in spl_fixedarray_object_get_properties()
178 zend_hash_index_update(ht, i, (void *)&intern->array->elements[i], sizeof(zval *), NULL); in spl_fixedarray_object_get_properties()
179 Z_ADDREF_P(intern->array->elements[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()
198 spl_fixedarray_object *intern = (spl_fixedarray_object *)object; in spl_fixedarray_object_free_storage() local
201 if (intern->array) { in spl_fixedarray_object_free_storage()
202 for (i = 0; i < intern->array->size; i++) { in spl_fixedarray_object_free_storage()
203 if (intern->array->elements[i]) { in spl_fixedarray_object_free_storage()
204 zval_ptr_dtor(&(intern->array->elements[i])); in spl_fixedarray_object_free_storage()
208 if (intern->array->size > 0 && intern->array->elements) { in spl_fixedarray_object_free_storage()
209 efree(intern->array->elements); in spl_fixedarray_object_free_storage()
211 efree(intern->array); in spl_fixedarray_object_free_storage()
214 zend_object_std_dtor(&intern->std TSRMLS_CC); in spl_fixedarray_object_free_storage()
215 zval_ptr_dtor(&intern->retval); in spl_fixedarray_object_free_storage()
226 spl_fixedarray_object *intern; in spl_fixedarray_object_new_ex() local
230 intern = ecalloc(1, sizeof(spl_fixedarray_object)); in spl_fixedarray_object_new_ex()
231 *obj = intern; in spl_fixedarray_object_new_ex()
232 ALLOC_INIT_ZVAL(intern->retval); in spl_fixedarray_object_new_ex()
234 zend_object_std_init(&intern->std, class_type TSRMLS_CC); in spl_fixedarray_object_new_ex()
235 object_properties_init(&intern->std, class_type); in spl_fixedarray_object_new_ex()
237 intern->current = 0; in spl_fixedarray_object_new_ex()
238 intern->flags = 0; in spl_fixedarray_object_new_ex()
242 intern->ce_get_iterator = other->ce_get_iterator; in spl_fixedarray_object_new_ex()
247 intern->array = emalloc(sizeof(spl_fixedarray)); in spl_fixedarray_object_new_ex()
248 spl_fixedarray_init(intern->array, other->array->size TSRMLS_CC); in spl_fixedarray_object_new_ex()
249 spl_fixedarray_copy(intern->array, other->array TSRMLS_CC); in spl_fixedarray_object_new_ex()
264 …retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_obj… in spl_fixedarray_object_new_ex()
278 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_REWIND; in spl_fixedarray_object_new_ex()
281 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_VALID; in spl_fixedarray_object_new_ex()
284 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_KEY; in spl_fixedarray_object_new_ex()
287 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_CURRENT; in spl_fixedarray_object_new_ex()
290 intern->flags |= SPL_FIXEDARRAY_OVERLOADED_NEXT; in spl_fixedarray_object_new_ex()
293 …_type->function_table, "offsetget", sizeof("offsetget"), (void **) &intern->fptr_offset_get); in spl_fixedarray_object_new_ex()
294 if (intern->fptr_offset_get->common.scope == parent) { in spl_fixedarray_object_new_ex()
295 intern->fptr_offset_get = NULL; in spl_fixedarray_object_new_ex()
297 …_type->function_table, "offsetset", sizeof("offsetset"), (void **) &intern->fptr_offset_set); in spl_fixedarray_object_new_ex()
298 if (intern->fptr_offset_set->common.scope == parent) { in spl_fixedarray_object_new_ex()
299 intern->fptr_offset_set = NULL; in spl_fixedarray_object_new_ex()
301 …_type->function_table, "offsetexists", sizeof("offsetexists"), (void **) &intern->fptr_offset_has); in spl_fixedarray_object_new_ex()
302 if (intern->fptr_offset_has->common.scope == parent) { in spl_fixedarray_object_new_ex()
303 intern->fptr_offset_has = NULL; in spl_fixedarray_object_new_ex()
305 …_type->function_table, "offsetunset", sizeof("offsetunset"), (void **) &intern->fptr_offset_del); in spl_fixedarray_object_new_ex()
306 if (intern->fptr_offset_del->common.scope == parent) { in spl_fixedarray_object_new_ex()
307 intern->fptr_offset_del = NULL; in spl_fixedarray_object_new_ex()
309 …class_type->function_table, "count", sizeof("count"), (void **) &intern->fptr_count); in spl_fixedarray_object_new_ex()
310 if (intern->fptr_count->common.scope == parent) { in spl_fixedarray_object_new_ex()
311 intern->fptr_count = NULL; in spl_fixedarray_object_new_ex()
332 spl_fixedarray_object *intern; in spl_fixedarray_object_clone() local
335 new_obj_val = spl_fixedarray_object_new_ex(old_object->ce, &intern, zobject, 1 TSRMLS_CC); in spl_fixedarray_object_clone()
336 new_object = &intern->std; in spl_fixedarray_object_clone()
344 static inline zval **spl_fixedarray_object_read_dimension_helper(spl_fixedarray_object *intern, zva… in spl_fixedarray_object_read_dimension_helper() argument
361 if (index < 0 || intern->array == NULL || index >= intern->array->size) { in spl_fixedarray_object_read_dimension_helper()
364 } else if(!intern->array->elements[index]) { in spl_fixedarray_object_read_dimension_helper()
367 return &intern->array->elements[index]; in spl_fixedarray_object_read_dimension_helper()
374 spl_fixedarray_object *intern; in spl_fixedarray_object_read_dimension() local
377 intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC); in spl_fixedarray_object_read_dimension()
379 if (intern->fptr_offset_get) { in spl_fixedarray_object_read_dimension()
386 …zend_call_method_with_1_params(&object, intern->std.ce, &intern->fptr_offset_get, "offsetGet", &rv… in spl_fixedarray_object_read_dimension()
389 zval_ptr_dtor(&intern->retval); in spl_fixedarray_object_read_dimension()
390 MAKE_STD_ZVAL(intern->retval); in spl_fixedarray_object_read_dimension()
391 ZVAL_ZVAL(intern->retval, rv, 1, 1); in spl_fixedarray_object_read_dimension()
392 return intern->retval; in spl_fixedarray_object_read_dimension()
397 retval = spl_fixedarray_object_read_dimension_helper(intern, offset TSRMLS_CC); in spl_fixedarray_object_read_dimension()
405 static inline void spl_fixedarray_object_write_dimension_helper(spl_fixedarray_object *intern, zval… in spl_fixedarray_object_write_dimension_helper() argument
421 if (index < 0 || intern->array == NULL || index >= intern->array->size) { in spl_fixedarray_object_write_dimension_helper()
425 if (intern->array->elements[index]) { in spl_fixedarray_object_write_dimension_helper()
426 zval_ptr_dtor(&(intern->array->elements[index])); in spl_fixedarray_object_write_dimension_helper()
429 intern->array->elements[index] = value; in spl_fixedarray_object_write_dimension_helper()
436 spl_fixedarray_object *intern; in spl_fixedarray_object_write_dimension() local
438 intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC); in spl_fixedarray_object_write_dimension()
440 if (intern->fptr_offset_set) { in spl_fixedarray_object_write_dimension()
447 …zend_call_method_with_2_params(&object, intern->std.ce, &intern->fptr_offset_set, "offsetSet", NUL… in spl_fixedarray_object_write_dimension()
453 spl_fixedarray_object_write_dimension_helper(intern, offset, value TSRMLS_CC); in spl_fixedarray_object_write_dimension()
457 static inline void spl_fixedarray_object_unset_dimension_helper(spl_fixedarray_object *intern, zval… in spl_fixedarray_object_unset_dimension_helper() argument
467 if (index < 0 || intern->array == NULL || index >= intern->array->size) { in spl_fixedarray_object_unset_dimension_helper()
471 if (intern->array->elements[index]) { in spl_fixedarray_object_unset_dimension_helper()
472 zval_ptr_dtor(&(intern->array->elements[index])); in spl_fixedarray_object_unset_dimension_helper()
474 intern->array->elements[index] = NULL; in spl_fixedarray_object_unset_dimension_helper()
481 spl_fixedarray_object *intern; in spl_fixedarray_object_unset_dimension() local
483 intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC); in spl_fixedarray_object_unset_dimension()
485 if (intern->fptr_offset_del) { in spl_fixedarray_object_unset_dimension()
487 …zend_call_method_with_1_params(&object, intern->std.ce, &intern->fptr_offset_del, "offsetUnset", N… in spl_fixedarray_object_unset_dimension()
492 spl_fixedarray_object_unset_dimension_helper(intern, offset TSRMLS_CC); in spl_fixedarray_object_unset_dimension()
497 static inline int spl_fixedarray_object_has_dimension_helper(spl_fixedarray_object *intern, zval *o… in spl_fixedarray_object_has_dimension_helper() argument
508 if (index < 0 || intern->array == NULL || index >= intern->array->size) { in spl_fixedarray_object_has_dimension_helper()
511 if (!intern->array->elements[index]) { in spl_fixedarray_object_has_dimension_helper()
514 if (zend_is_true(intern->array->elements[index])) { in spl_fixedarray_object_has_dimension_helper()
530 spl_fixedarray_object *intern; in spl_fixedarray_object_has_dimension() local
532 intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC); in spl_fixedarray_object_has_dimension()
534 if (intern->fptr_offset_get) { in spl_fixedarray_object_has_dimension()
537 …zend_call_method_with_1_params(&object, intern->std.ce, &intern->fptr_offset_has, "offsetExists", … in spl_fixedarray_object_has_dimension()
540 zval_ptr_dtor(&intern->retval); in spl_fixedarray_object_has_dimension()
541 MAKE_STD_ZVAL(intern->retval); in spl_fixedarray_object_has_dimension()
542 ZVAL_ZVAL(intern->retval, rv, 1, 1); in spl_fixedarray_object_has_dimension()
543 return zend_is_true(intern->retval); in spl_fixedarray_object_has_dimension()
548 return spl_fixedarray_object_has_dimension_helper(intern, offset, check_empty TSRMLS_CC); in spl_fixedarray_object_has_dimension()
554 spl_fixedarray_object *intern; in spl_fixedarray_object_count_elements() local
556 intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC); in spl_fixedarray_object_count_elements()
557 if (intern->fptr_count) { in spl_fixedarray_object_count_elements()
559 zend_call_method_with_0_params(&object, intern->std.ce, &intern->fptr_count, "count", &rv); in spl_fixedarray_object_count_elements()
561 zval_ptr_dtor(&intern->retval); in spl_fixedarray_object_count_elements()
562 MAKE_STD_ZVAL(intern->retval); in spl_fixedarray_object_count_elements()
563 ZVAL_ZVAL(intern->retval, rv, 1, 1); in spl_fixedarray_object_count_elements()
564 convert_to_long(intern->retval); in spl_fixedarray_object_count_elements()
565 *count = (long) Z_LVAL_P(intern->retval); in spl_fixedarray_object_count_elements()
568 } else if (intern->array) { in spl_fixedarray_object_count_elements()
569 *count = intern->array->size; in spl_fixedarray_object_count_elements()
583 spl_fixedarray_object *intern; in SPL_METHOD() local
595 intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC); in SPL_METHOD()
597 if (intern->array) { in SPL_METHOD()
602 intern->array = emalloc(sizeof(spl_fixedarray)); in SPL_METHOD()
603 spl_fixedarray_init(intern->array, size TSRMLS_CC); in SPL_METHOD()
611 …spl_fixedarray_object *intern = (spl_fixedarray_object *) zend_object_store_get_object(getThis() T… in SPL_METHOD() local
620 if (!intern->array) { in SPL_METHOD()
624 intern->array = emalloc(sizeof(spl_fixedarray)); in SPL_METHOD()
625 spl_fixedarray_init(intern->array, size TSRMLS_CC); in SPL_METHOD()
629 intern->array->elements[index++] = *data; in SPL_METHOD()
644 spl_fixedarray_object *intern; in SPL_METHOD() local
650 intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC); in SPL_METHOD()
651 if (intern->array) { in SPL_METHOD()
652 RETURN_LONG(intern->array->size); in SPL_METHOD()
662 spl_fixedarray_object *intern; in SPL_METHOD() local
668 intern = (spl_fixedarray_object *)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
671 if (intern->array) { in SPL_METHOD()
673 for (; i < intern->array->size; i++) { in SPL_METHOD()
674 if (intern->array->elements[i]) { in SPL_METHOD()
675 …zend_hash_index_update(Z_ARRVAL_P(return_value), i, (void *)&intern->array->elements[i], sizeof(zv… in SPL_METHOD()
676 Z_ADDREF_P(intern->array->elements[i]); in SPL_METHOD()
692 spl_fixedarray_object *intern; in SPL_METHOD() local
768 intern = (spl_fixedarray_object *)zend_object_store_get_object(return_value TSRMLS_CC); in SPL_METHOD()
769 intern->array = array; in SPL_METHOD()
778 spl_fixedarray_object *intern; in SPL_METHOD() local
784 intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC); in SPL_METHOD()
785 if (intern->array) { in SPL_METHOD()
786 RETURN_LONG(intern->array->size); in SPL_METHOD()
797 spl_fixedarray_object *intern; in SPL_METHOD() local
809 intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC); in SPL_METHOD()
810 if (!intern->array) { in SPL_METHOD()
811 intern->array = ecalloc(1, sizeof(spl_fixedarray)); in SPL_METHOD()
814 spl_fixedarray_resize(intern->array, size TSRMLS_CC); in SPL_METHOD()
824 spl_fixedarray_object *intern; in SPL_METHOD() local
830 intern = (spl_fixedarray_object *)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
832 RETURN_BOOL(spl_fixedarray_object_has_dimension_helper(intern, zindex, 0 TSRMLS_CC)); in SPL_METHOD()
840 spl_fixedarray_object *intern; in SPL_METHOD() local
846 intern = (spl_fixedarray_object *)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
847 value_pp = spl_fixedarray_object_read_dimension_helper(intern, zindex TSRMLS_CC); in SPL_METHOD()
860 spl_fixedarray_object *intern; in SPL_METHOD() local
866 intern = (spl_fixedarray_object *)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
867 spl_fixedarray_object_write_dimension_helper(intern, zindex, value TSRMLS_CC); in SPL_METHOD()
876 spl_fixedarray_object *intern; in SPL_METHOD() local
882 intern = (spl_fixedarray_object *)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
883 spl_fixedarray_object_unset_dimension_helper(intern, zindex TSRMLS_CC); in SPL_METHOD()
892 zval_ptr_dtor((zval**)&iterator->intern.it.data); in spl_fixedarray_it_dtor()
901 spl_fixedarray_object *intern = iterator->object; in spl_fixedarray_it_rewind() local
903 if (intern->flags & SPL_FIXEDARRAY_OVERLOADED_REWIND) { in spl_fixedarray_it_rewind()
914 spl_fixedarray_object *intern = iterator->object; in spl_fixedarray_it_valid() local
916 if (intern->flags & SPL_FIXEDARRAY_OVERLOADED_VALID) { in spl_fixedarray_it_valid()
932 spl_fixedarray_object *intern = iterator->object; in spl_fixedarray_it_get_current_data() local
934 if (intern->flags & SPL_FIXEDARRAY_OVERLOADED_CURRENT) { in spl_fixedarray_it_get_current_data()
940 *data = spl_fixedarray_object_read_dimension_helper(intern, zindex TSRMLS_CC); in spl_fixedarray_it_get_current_data()
954 spl_fixedarray_object *intern = iterator->object; in spl_fixedarray_it_get_current_key() local
956 if (intern->flags & SPL_FIXEDARRAY_OVERLOADED_KEY) { in spl_fixedarray_it_get_current_key()
969 spl_fixedarray_object *intern = iterator->object; in spl_fixedarray_it_move_forward() local
971 if (intern->flags & SPL_FIXEDARRAY_OVERLOADED_NEXT) { in spl_fixedarray_it_move_forward()
984 …spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(getThis() TSR… in SPL_METHOD() local
990 RETURN_LONG(intern->current); in SPL_METHOD()
998 …spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(getThis() TSR… in SPL_METHOD() local
1004 intern->current++; in SPL_METHOD()
1012 …spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(getThis() TSR… in SPL_METHOD() local
1018 RETURN_BOOL(intern->current >= 0 && intern->array && intern->current < intern->array->size); in SPL_METHOD()
1026 …spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(getThis() TSR… in SPL_METHOD() local
1032 intern->current = 0; in SPL_METHOD()
1041 …spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(getThis() TS… in SPL_METHOD() local
1048 ZVAL_LONG(zindex, intern->current); in SPL_METHOD()
1050 value_pp = spl_fixedarray_object_read_dimension_helper(intern, zindex TSRMLS_CC); in SPL_METHOD()
1084 iterator->intern.it.data = (void*)object; in spl_fixedarray_get_iterator()
1085 iterator->intern.it.funcs = &spl_fixedarray_it_funcs; in spl_fixedarray_get_iterator()
1086 iterator->intern.ce = ce; in spl_fixedarray_get_iterator()
1087 iterator->intern.value = NULL; in spl_fixedarray_get_iterator()