void clean_non_persistent_constants(void) { if (EG(full_tables_cleanup)) { zend_hash_apply(EG(zend_constants), clean_non_persistent_constant_full); } else { zend_hash_reverse_apply(EG(zend_constants), clean_non_persistent_constant); } }
void zend_accel_free_user_functions(HashTable *ht) { dtor_func_t orig_dtor = ht->pDestructor; ht->pDestructor = NULL; zend_hash_apply(ht, (apply_func_t) is_not_internal_function); ht->pDestructor = orig_dtor; }
static void print_modules(void) /* {{{ */ { HashTable sorted_registry; zend_hash_init(&sorted_registry, 50, NULL, NULL, 0); zend_hash_copy(&sorted_registry, &module_registry, NULL); zend_hash_sort(&sorted_registry, module_name_cmp, 0); zend_hash_apply(&sorted_registry, print_module_info); zend_hash_destroy(&sorted_registry); }
ZEND_API void zend_ts_hash_apply(TsHashTable *ht, apply_func_t apply_func TSRMLS_DC) { begin_write(ht); zend_hash_apply(TS_HASH(ht), apply_func TSRMLS_CC); end_write(ht); }
static void zend_accel_persist_class_table(HashTable *class_table) { zend_hash_persist(class_table, zend_persist_class_entry); zend_hash_apply(class_table, (apply_func_t) zend_update_parent_ce); }
static int zend_update_parent_ce(zval *zv) { zend_class_entry *ce = Z_PTR_P(zv); if (ce->parent) { ce->parent = zend_shared_alloc_get_xlat_entry(ce->parent); /* We use refcount to show if the class is used as a parent */ ce->parent->refcount++; } /* update methods */ if (ce->constructor) { ce->constructor = zend_shared_alloc_get_xlat_entry(ce->constructor); /* we use refcount to show that op_array is referenced from several places */ ce->constructor->op_array.refcount++; } if (ce->destructor) { ce->destructor = zend_shared_alloc_get_xlat_entry(ce->destructor); ce->destructor->op_array.refcount++; } if (ce->clone) { ce->clone = zend_shared_alloc_get_xlat_entry(ce->clone); ce->clone->op_array.refcount++; } if (ce->__get) { ce->__get = zend_shared_alloc_get_xlat_entry(ce->__get); ce->__get->op_array.refcount++; } if (ce->__set) { ce->__set = zend_shared_alloc_get_xlat_entry(ce->__set); ce->__set->op_array.refcount++; } if (ce->__call) { ce->__call = zend_shared_alloc_get_xlat_entry(ce->__call); ce->__call->op_array.refcount++; } if (ce->serialize_func) { ce->serialize_func = zend_shared_alloc_get_xlat_entry(ce->serialize_func); ce->serialize_func->op_array.refcount++; } if (ce->unserialize_func) { ce->unserialize_func = zend_shared_alloc_get_xlat_entry(ce->unserialize_func); ce->unserialize_func->op_array.refcount++; } if (ce->__isset) { ce->__isset = zend_shared_alloc_get_xlat_entry(ce->__isset); ce->__isset->op_array.refcount++; } if (ce->__unset) { ce->__unset = zend_shared_alloc_get_xlat_entry(ce->__unset); ce->__unset->op_array.refcount++; } if (ce->__tostring) { ce->__tostring = zend_shared_alloc_get_xlat_entry(ce->__tostring); ce->__tostring->op_array.refcount++; } if (ce->__callstatic) { ce->__callstatic = zend_shared_alloc_get_xlat_entry(ce->__callstatic); ce->__callstatic->op_array.refcount++; } if (ce->__debugInfo) { ce->__debugInfo = zend_shared_alloc_get_xlat_entry(ce->__debugInfo); ce->__debugInfo->op_array.refcount++; } zend_hash_apply(&ce->properties_info, (apply_func_t) zend_update_property_info_ce); return 0; }
PHPAPI void destroy_uploaded_files_hash(void) /* {{{ */ { zend_hash_apply(SG(rfc1867_uploaded_files), unlink_filename); zend_hash_destroy(SG(rfc1867_uploaded_files)); FREE_HASHTABLE(SG(rfc1867_uploaded_files)); }