Permalink
Browse files

MFH: add zend_ts_hash_copy_to_hash()

  • Loading branch information...
tony2001 committed Jan 9, 2009
1 parent 71ea953 commit 514e6333278ff089a9fd27b7d1bba4ea23c28641
Showing with 8 additions and 0 deletions.
  1. +7 −0 Zend/zend_ts_hash.c
  2. +1 −0 Zend/zend_ts_hash.h
View
@@ -273,6 +273,13 @@ ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_c
end_read(source);
}
+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);
View
@@ -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);

0 comments on commit 514e633

Please sign in to comment.