]> granicus.if.org Git - php/commitdiff
add zend_ts_hash_copy_to_hash()
authorAntony Dovgal <tony2001@php.net>
Fri, 9 Jan 2009 19:16:02 +0000 (19:16 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 9 Jan 2009 19:16:02 +0000 (19:16 +0000)
Zend/zend_ts_hash.c
Zend/zend_ts_hash.h

index ca6b2d2dae03a7ebeaa4d87dae3611ac72967fc8..31570e231ee9a18f58ef5b0e1262a03e35756cd3 100644 (file)
@@ -298,6 +298,14 @@ ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_c
 }
 /* }}} */
 
+ZEND_API void zend_ts_hash_copy_to_hash(HashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size) /* {{{ */
+{
+       begin_read(source);
+       zend_hash_copy(target, TS_HASH(source), pCopyConstructor, tmp, size);
+       end_read(source);
+}
+/* }}} */
+
 ZEND_API void zend_ts_hash_merge(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite) /* {{{ */
 {
        begin_read(source);
index 617d14f9db9d03b82cde6944b12cb867dc9026e9..099ee0d0155b494a951dac4f6c444810f9414437 100644 (file)
@@ -97,6 +97,7 @@ ZEND_API int zend_ts_hash_index_exists(TsHashTable *ht, ulong h);
 
 /* Copying, merging and sorting */
 ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size);
+ZEND_API void zend_ts_hash_copy_to_hash(HashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size);
 ZEND_API void zend_ts_hash_merge(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite);
 ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam);
 ZEND_API int zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber TSRMLS_DC);