]> granicus.if.org Git - php/commitdiff
TSRMLS fixes
authorZeev Suraski <zeev@php.net>
Thu, 2 Aug 2001 05:25:29 +0000 (05:25 +0000)
committerZeev Suraski <zeev@php.net>
Thu, 2 Aug 2001 05:25:29 +0000 (05:25 +0000)
Zend/zend_builtin_functions.c
Zend/zend_hash.c
Zend/zend_hash.h

index a0e5e67da4252cb98e3394235c527b141e36f2b3..344fd3d1c0863dbb5c4b39c333a8a9533eca8091 100644 (file)
@@ -851,7 +851,7 @@ ZEND_FUNCTION(get_declared_classes)
        }
 
        array_init(return_value);
-       zend_hash_apply_with_arguments(EG(class_table), (apply_func_args_t)copy_class_name, 1, return_value);
+       zend_hash_apply_with_arguments(EG(class_table), (apply_func_args_t) copy_class_name, 1, return_value);
 }
 /* }}} */
 
@@ -891,7 +891,7 @@ ZEND_FUNCTION(get_defined_functions)
        array_init(user);
        array_init(return_value);
        
-       zend_hash_apply_with_arguments(EG(function_table), (apply_func_args_t)copy_function_name, 2, internal, user);
+       zend_hash_apply_with_arguments(EG(function_table), (apply_func_args_t) copy_function_name, 2, internal, user);
        
        if (zend_hash_add(return_value->value.ht, "internal", sizeof("internal"), (void **)&internal, sizeof(zval *), NULL) == FAILURE) {
                zend_error(E_WARNING, "Cannot add internal functions to return value from get_defined_functions()");
index 0078a53893e7449db3a90df94a901b85f8deeff8..437190e001e98f3c0c83a464ad154c086879fc7b 100644 (file)
@@ -711,7 +711,7 @@ ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t appl
        HASH_PROTECT_RECURSION(ht);
        p = ht->pListHead;
        while (p != NULL) {
-               if (apply_func(p->pData, argument)) {
+               if (apply_func(p->pData, argument TSRMLS_CC)) {
                        p = zend_hash_apply_deleter(ht, p);
                } else {
                        p = p->pListNext;
@@ -721,7 +721,7 @@ ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t appl
 }
 
 
-ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, int (*destruct)(void *, int, va_list, zend_hash_key *), int num_args, ...)
+ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t destruct, int num_args, ...)
 {
        Bucket *p;
        va_list args;
index e14b6c62f800e30b4789886261f8d7df9718fe94..c1d593f76e5366e15b2115ac3b9bf03f909d6803 100644 (file)
@@ -38,7 +38,7 @@ typedef int  (*compare_func_t)(const void *, const void *);
 typedef void (*sort_func_t)(void *, size_t, register size_t, compare_func_t);
 typedef void (*dtor_func_t)(void *pDest);
 typedef int (*apply_func_t)(void *pDest TSRMLS_DC);
-typedef int (*apply_func_arg_t)(void *pDest, void *argument);
+typedef int (*apply_func_arg_t)(void *pDest, void *argument TSRMLS_DC);
 typedef void (*copy_ctor_func_t)(void *pElement);
 
 struct _hashtable;