]> granicus.if.org Git - php/commitdiff
Improve tracking
authorZeev Suraski <zeev@php.net>
Mon, 18 Aug 2003 20:44:12 +0000 (20:44 +0000)
committerZeev Suraski <zeev@php.net>
Mon, 18 Aug 2003 20:44:12 +0000 (20:44 +0000)
Zend/zend_ts_hash.c
Zend/zend_ts_hash.h

index 19ee2370f24cc6f8cf66b08e4e888ab7ebc21189..5fca8292a8eb41d72328a3c3193d64dfa14d9f81 100644 (file)
@@ -18,6 +18,7 @@
 
 /* $Id$ */
 
+#include "zend.h"
 #include "zend_ts_hash.h"
 
 /* ts management functions */
@@ -58,24 +59,24 @@ static void end_write(TsHashTable *ht)
 }
 
 /* delegates */
-ZEND_API int zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent)
+ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
 {
 #ifdef ZTS
        ht->mx_reader = tsrm_mutex_alloc();
        ht->mx_writer = tsrm_mutex_alloc();
        ht->reader = 0;
 #endif
-       return zend_hash_init(TS_HASH(ht), nSize, pHashFunction, pDestructor, persistent);
+       return _zend_hash_init(TS_HASH(ht), nSize, pHashFunction, pDestructor, persistent ZEND_FILE_LINE_RELAY_CC);
 }
 
-ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection)
+ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
 {
 #ifdef ZTS
        ht->mx_reader = tsrm_mutex_alloc();
        ht->mx_writer = tsrm_mutex_alloc();
        ht->reader = 0;
 #endif
-       return zend_hash_init_ex(TS_HASH(ht), nSize, pHashFunction, pDestructor, persistent, bApplyProtection);
+       return _zend_hash_init_ex(TS_HASH(ht), nSize, pHashFunction, pDestructor, persistent, bApplyProtection ZEND_FILE_LINE_RELAY_CC);
 }
 
 ZEND_API void zend_ts_hash_destroy(TsHashTable *ht)
index b6b7570865a904964a94a9ec4bf7cb4348cce509..01b2de89c66a35daa76d0ebc63b9c91c210e5236 100644 (file)
@@ -37,11 +37,17 @@ BEGIN_EXTERN_C()
 #define TS_HASH(table) (&(table->hash))
 
 /* startup/shutdown */
-ZEND_API int zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent);
-ZEND_API int zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection);
+ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC);
+ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC);
 ZEND_API void zend_ts_hash_destroy(TsHashTable *ht);
 ZEND_API void zend_ts_hash_clean(TsHashTable *ht);
 
+#define zend_ts_hash_init(ht, nSize, pHashFunction, pDestructor, persistent)   \
+       _zend_ts_hash_init(ht, nSize, pHashFunction, pDestructor, persistent ZEND_FILE_LINE_CC)
+#define zend_ts_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection)      \
+       _zend_ts_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection ZEND_FILE_LINE_CC)
+
+
 /* additions/updates/changes */
 ZEND_API int zend_ts_hash_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag);
 #define zend_ts_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest) \