Lines Matching refs:intern

99 	spl_SplObjectStorage *intern = (spl_SplObjectStorage *)object;  in spl_SplOjectStorage_free_storage()  local
101 zend_object_std_dtor(&intern->std TSRMLS_CC); in spl_SplOjectStorage_free_storage()
103 zend_hash_destroy(&intern->storage); in spl_SplOjectStorage_free_storage()
105 if (intern->debug_info != NULL) { in spl_SplOjectStorage_free_storage()
106 zend_hash_destroy(intern->debug_info); in spl_SplOjectStorage_free_storage()
107 efree(intern->debug_info); in spl_SplOjectStorage_free_storage()
113 static char *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zval *this, zval *obj, int … in spl_object_storage_get_hash() argument
114 if (intern->fptr_get_hash) { in spl_object_storage_get_hash()
116 …zend_call_method_with_1_params(&this, intern->std.ce, &intern->fptr_get_hash, "getHash", &rv, obj); in spl_object_storage_get_hash()
168 static void spl_object_storage_free_hash(spl_SplObjectStorage *intern, char *hash) { in spl_object_storage_free_hash() argument
169 if (intern->fptr_get_hash) { in spl_object_storage_free_hash()
186 spl_SplObjectStorageElement* spl_object_storage_get(spl_SplObjectStorage *intern, char *hash, int h… in spl_object_storage_get() argument
189 if (zend_hash_find(&intern->storage, hash, hash_len, (void**)&element) == SUCCESS) { in spl_object_storage_get()
196 void spl_object_storage_attach(spl_SplObjectStorage *intern, zval *this, zval *obj, zval *inf TSRML… in spl_object_storage_attach() argument
201 char *hash = spl_object_storage_get_hash(intern, this, obj, &hash_len TSRMLS_CC); in spl_object_storage_attach()
206 pelement = spl_object_storage_get(intern, hash, hash_len TSRMLS_CC); in spl_object_storage_attach()
216 spl_object_storage_free_hash(intern, hash); in spl_object_storage_attach()
222 …zend_hash_update(&intern->storage, hash, hash_len, &element, sizeof(spl_SplObjectStorageElement), … in spl_object_storage_attach()
223 spl_object_storage_free_hash(intern, hash); in spl_object_storage_attach()
226 int spl_object_storage_detach(spl_SplObjectStorage *intern, zval *this, zval *obj TSRMLS_DC) /* {{{… in spl_object_storage_detach() argument
229 char *hash = spl_object_storage_get_hash(intern, this, obj, &hash_len TSRMLS_CC); in spl_object_storage_detach()
233 ret = zend_hash_del(&intern->storage, hash, hash_len); in spl_object_storage_detach()
234 spl_object_storage_free_hash(intern, hash); in spl_object_storage_detach()
239 void spl_object_storage_addall(spl_SplObjectStorage *intern, zval *this, spl_SplObjectStorage *othe… in spl_object_storage_addall() argument
245 spl_object_storage_attach(intern, this, element->obj, element->inf TSRMLS_CC); in spl_object_storage_addall()
249 zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); in spl_object_storage_addall()
250 intern->index = 0; in spl_object_storage_addall()
256 spl_SplObjectStorage *intern; in spl_object_storage_new_ex() local
259 intern = emalloc(sizeof(spl_SplObjectStorage)); in spl_object_storage_new_ex()
260 memset(intern, 0, sizeof(spl_SplObjectStorage)); in spl_object_storage_new_ex()
261 *obj = intern; in spl_object_storage_new_ex()
263 zend_object_std_init(&intern->std, class_type TSRMLS_CC); in spl_object_storage_new_ex()
264 object_properties_init(&intern->std, class_type); in spl_object_storage_new_ex()
266 zend_hash_init(&intern->storage, 0, NULL, (void (*)(void *))spl_object_storage_dtor, 0); in spl_object_storage_new_ex()
268 …retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_obj… in spl_object_storage_new_ex()
273 spl_object_storage_addall(intern, orig, other TSRMLS_CC); in spl_object_storage_new_ex()
279 …&class_type->function_table, "gethash", sizeof("gethash"), (void **) &intern->fptr_get_hash); in spl_object_storage_new_ex()
280 if (intern->fptr_get_hash->common.scope == spl_ce_SplObjectStorage) { in spl_object_storage_new_ex()
281 intern->fptr_get_hash = NULL; in spl_object_storage_new_ex()
301 spl_SplObjectStorage *intern; in spl_object_storage_clone() local
304 new_obj_val = spl_object_storage_new_ex(old_object->ce, &intern, zobject TSRMLS_CC); in spl_object_storage_clone()
305 new_object = &intern->std; in spl_object_storage_clone()
315 spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(obj TSRMLS_CC); in spl_object_storage_debug_info() local
329 if (intern->debug_info == NULL) { in spl_object_storage_debug_info()
330 ALLOC_HASHTABLE(intern->debug_info); in spl_object_storage_debug_info()
331 ZEND_INIT_SYMTABLE_EX(intern->debug_info, zend_hash_num_elements(props) + 1, 0); in spl_object_storage_debug_info()
334 if (intern->debug_info->nApplyCount == 0) { in spl_object_storage_debug_info()
335 …zend_hash_copy(intern->debug_info, props, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(z… in spl_object_storage_debug_info()
340 zend_hash_internal_pointer_reset_ex(&intern->storage, &pos); in spl_object_storage_debug_info()
341 while (zend_hash_get_current_data_ex(&intern->storage, (void **)&element, &pos) == SUCCESS) { in spl_object_storage_debug_info()
351 zend_hash_move_forward_ex(&intern->storage, &pos); in spl_object_storage_debug_info()
355 zend_symtable_update(intern->debug_info, zname, name_len+1, &storage, sizeof(zval *), NULL); in spl_object_storage_debug_info()
359 return intern->debug_info; in spl_object_storage_debug_info()
367 spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(obj TSRMLS_CC); in spl_object_storage_get_gc() local
395 zend_hash_internal_pointer_reset_ex(&intern->storage, &pos); in spl_object_storage_get_gc()
396 while (zend_hash_get_current_data_ex(&intern->storage, (void **)&element, &pos) == SUCCESS) { in spl_object_storage_get_gc()
399 zend_hash_move_forward_ex(&intern->storage, &pos); in spl_object_storage_get_gc()
439 int spl_object_storage_contains(spl_SplObjectStorage *intern, zval *this, zval *obj TSRMLS_DC) /* {… in spl_object_storage_contains() argument
442 char *hash = spl_object_storage_get_hash(intern, this, obj, &hash_len TSRMLS_CC); in spl_object_storage_contains()
447 found = zend_hash_exists(&intern->storage, hash, hash_len); in spl_object_storage_contains()
448 spl_object_storage_free_hash(intern, hash); in spl_object_storage_contains()
458 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
463 spl_object_storage_attach(intern, getThis(), obj, inf TSRMLS_CC); in SPL_METHOD()
471 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
476 spl_object_storage_detach(intern, getThis(), obj TSRMLS_CC); in SPL_METHOD()
478 zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); in SPL_METHOD()
479 intern->index = 0; in SPL_METHOD()
506 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
514 hash = spl_object_storage_get_hash(intern, getThis(), obj, &hash_len TSRMLS_CC); in SPL_METHOD()
519 element = spl_object_storage_get(intern, hash, hash_len TSRMLS_CC); in SPL_METHOD()
520 spl_object_storage_free_hash(intern, hash); in SPL_METHOD()
534 …spl_SplObjectStorage *intern = (spl_SplObjectStorage *)zend_object_store_get_object(getThis() TSRM… in SPL_METHOD() local
543 spl_object_storage_addall(intern, getThis(), other TSRMLS_CC); in SPL_METHOD()
545 RETURN_LONG(zend_hash_num_elements(&intern->storage)); in SPL_METHOD()
553 …spl_SplObjectStorage *intern = (spl_SplObjectStorage *)zend_object_store_get_object(getThis() TSRM… in SPL_METHOD() local
565 if (spl_object_storage_detach(intern, getThis(), element->obj TSRMLS_CC) == FAILURE) { in SPL_METHOD()
570 zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); in SPL_METHOD()
571 intern->index = 0; in SPL_METHOD()
573 RETURN_LONG(zend_hash_num_elements(&intern->storage)); in SPL_METHOD()
581 …spl_SplObjectStorage *intern = (spl_SplObjectStorage *)zend_object_store_get_object(getThis() TSRM… in SPL_METHOD() local
591 zend_hash_internal_pointer_reset(&intern->storage); in SPL_METHOD()
592 while (zend_hash_get_current_data(&intern->storage, (void **)&element) == SUCCESS) { in SPL_METHOD()
594 spl_object_storage_detach(intern, getThis(), element->obj TSRMLS_CC); in SPL_METHOD()
596 zend_hash_move_forward(&intern->storage); in SPL_METHOD()
599 zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); in SPL_METHOD()
600 intern->index = 0; in SPL_METHOD()
602 RETURN_LONG(zend_hash_num_elements(&intern->storage)); in SPL_METHOD()
611 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
616 RETURN_BOOL(spl_object_storage_contains(intern, getThis(), obj TSRMLS_CC)); in SPL_METHOD()
623 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
629 RETURN_LONG(zend_hash_num_elements(&intern->storage)); in SPL_METHOD()
636 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
642 zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); in SPL_METHOD()
643 intern->index = 0; in SPL_METHOD()
650 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
656 RETURN_BOOL(zend_hash_has_more_elements_ex(&intern->storage, &intern->pos) == SUCCESS); in SPL_METHOD()
663 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
669 RETURN_LONG(intern->index); in SPL_METHOD()
677 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
683 if (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == FAILURE) { in SPL_METHOD()
694 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
700 if (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == FAILURE) { in SPL_METHOD()
711 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
718 if (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == FAILURE) { in SPL_METHOD()
730 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
736 zend_hash_move_forward_ex(&intern->storage, &intern->pos); in SPL_METHOD()
737 intern->index++; in SPL_METHOD()
744 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
761 ZVAL_LONG(flags, zend_hash_num_elements(&intern->storage)); in SPL_METHOD()
765 zend_hash_internal_pointer_reset_ex(&intern->storage, &pos); in SPL_METHOD()
767 while(zend_hash_has_more_elements_ex(&intern->storage, &pos) == SUCCESS) { in SPL_METHOD()
768 if (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &pos) == FAILURE) { in SPL_METHOD()
777 zend_hash_move_forward_ex(&intern->storage, &pos); in SPL_METHOD()
803 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
871 hash = spl_object_storage_get_hash(intern, getThis(), pentry, &hash_len TSRMLS_CC); in SPL_METHOD()
877 pelement = spl_object_storage_get(intern, hash, hash_len TSRMLS_CC); in SPL_METHOD()
878 spl_object_storage_free_hash(intern, hash); in SPL_METHOD()
887 spl_object_storage_attach(intern, getThis(), pentry, pinf TSRMLS_CC); in SPL_METHOD()
911 if (!intern->std.properties) { in SPL_METHOD()
912 rebuild_object_properties(&intern->std); in SPL_METHOD()
914 …zend_hash_copy(intern->std.properties, Z_ARRVAL_P(pmembers), (copy_ctor_func_t) zval_add_ref, (voi… in SPL_METHOD()
1005 spl_SplObjectStorage *intern; in SPL_METHOD() local
1016 intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
1017 intern->flags = flags; in SPL_METHOD()
1026 …spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRML… in SPL_METHOD() local
1031 RETURN_LONG(intern->flags); in SPL_METHOD()
1039 spl_SplObjectStorage *intern; in SPL_METHOD() local
1040 intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
1042 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intern->flags) == FAILURE) { in SPL_METHOD()
1052 spl_SplObjectStorage *intern; in SPL_METHOD() local
1059 intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
1070 zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); in SPL_METHOD()
1071 …while (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == SUCCESS)… in SPL_METHOD()
1077 zend_hash_move_forward_ex(&intern->storage, &intern->pos); in SPL_METHOD()
1081 spl_object_storage_attach(intern, getThis(), iterator, info TSRMLS_CC); in SPL_METHOD()
1089 spl_SplObjectStorage *intern; in SPL_METHOD() local
1093 intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
1099 zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); in SPL_METHOD()
1100 …while (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == SUCCESS … in SPL_METHOD()
1103 zend_hash_move_forward_ex(&intern->storage, &intern->pos); in SPL_METHOD()
1112 spl_SplObjectStorage *intern; in SPL_METHOD() local
1116 intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
1122 zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); in SPL_METHOD()
1123 …while (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == SUCCESS … in SPL_METHOD()
1126 zend_hash_move_forward_ex(&intern->storage, &intern->pos); in SPL_METHOD()
1135 spl_SplObjectStorage *intern; in SPL_METHOD() local
1140 intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
1146 if (!zend_hash_num_elements(&intern->storage)) { in SPL_METHOD()
1150 expect = (intern->flags & MIT_NEED_ALL) ? 1 : 0; in SPL_METHOD()
1152 zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); in SPL_METHOD()
1153 …while (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == SUCCESS … in SPL_METHOD()
1168 zend_hash_move_forward_ex(&intern->storage, &intern->pos); in SPL_METHOD()
1175 static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_type, zval *return_… in spl_multiple_iterator_get_all() argument
1181 num_elements = zend_hash_num_elements(&intern->storage); in spl_multiple_iterator_get_all()
1188 zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); in spl_multiple_iterator_get_all()
1189 …while (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == SUCCESS … in spl_multiple_iterator_get_all()
1210 } else if (intern->flags & MIT_NEED_ALL) { in spl_multiple_iterator_get_all()
1221 if (intern->flags & MIT_KEYS_ASSOC) { in spl_multiple_iterator_get_all()
1238 zend_hash_move_forward_ex(&intern->storage, &intern->pos); in spl_multiple_iterator_get_all()
1247 spl_SplObjectStorage *intern; in SPL_METHOD() local
1248 intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
1254 …spl_multiple_iterator_get_all(intern, SPL_MULTIPLE_ITERATOR_GET_ALL_CURRENT, return_value TSRMLS_C… in SPL_METHOD()
1262 spl_SplObjectStorage *intern; in SPL_METHOD() local
1263 intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); in SPL_METHOD()
1269 spl_multiple_iterator_get_all(intern, SPL_MULTIPLE_ITERATOR_GET_ALL_KEY, return_value TSRMLS_CC); in SPL_METHOD()