cvs: ZendEngine2 / zend_ts_hash.c zend_ts_hash.h
| From: | Zeev Suraski | Date: | Mon, 18 Aug 2003 20:44:12 +0000 |
| Subject: | cvs: ZendEngine2 / zend_ts_hash.c zend_ts_hash.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1646@lists.php.net to get a copy of this message | ||
zeev Mon Aug 18 16:44:12 2003 EDT
Modified files:
/ZendEngine2 zend_ts_hash.c zend_ts_hash.h
Log:
Improve tracking
Index: ZendEngine2/zend_ts_hash.c
diff -u ZendEngine2/zend_ts_hash.c:1.10 ZendEngine2/zend_ts_hash.c:1.11
--- ZendEngine2/zend_ts_hash.c:1.10 Tue Jun 10 16:03:25 2003
+++ ZendEngine2/zend_ts_hash.c Mon Aug 18 16:44:12 2003
@@ -16,8 +16,9 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ts_hash.c,v 1.10 2003/06/10 20:03:25 imajes Exp $ */
+/* $Id: zend_ts_hash.c,v 1.11 2003/08/18 20:44:12 zeev Exp $ */
+#include "zend.h"
#include "zend_ts_hash.h"
/* ts management functions */
@@ -58,24 +59,24 @@
}
/* 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: ZendEngine2/zend_ts_hash.h
diff -u ZendEngine2/zend_ts_hash.h:1.9 ZendEngine2/zend_ts_hash.h:1.10
--- ZendEngine2/zend_ts_hash.h:1.9 Tue Jun 10 16:03:25 2003
+++ ZendEngine2/zend_ts_hash.h Mon Aug 18 16:44:12 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ts_hash.h,v 1.9 2003/06/10 20:03:25 imajes Exp $ */
+/* $Id: zend_ts_hash.h,v 1.10 2003/08/18 20:44:12 zeev Exp $ */
#ifndef ZEND_TS_HASH_H
#define ZEND_TS_HASH_H
@@ -37,10 +37,16 @@
#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);