]> granicus.if.org Git - php/commitdiff
Remove references to BG(user_compare_fnnc_name).
authorAndrei Zmievski <andrei@php.net>
Fri, 21 Jul 2006 23:29:25 +0000 (23:29 +0000)
committerAndrei Zmievski <andrei@php.net>
Fri, 21 Jul 2006 23:29:25 +0000 (23:29 +0000)
# Less bickering, more coding!

ext/standard/array.c
ext/standard/basic_functions.c
ext/standard/basic_functions.h

index 34579ef8f6555bd2f0ccbd09c8e6760cc564964f..00f57ad58d2fa64288402b0d016c972ce19b8b75 100644 (file)
@@ -602,7 +602,6 @@ static int array_user_compare(const void *a, const void *b TSRMLS_DC)
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid comparison function.");    \
         BG(user_compare_fci) = old_user_compare_fci; \
         BG(user_compare_fci_cache) = old_user_compare_fci_cache; \
-               BG(user_compare_func_name) = old_compare_func;  \
                RETURN_FALSE;   \
        }       \
 
@@ -615,12 +614,10 @@ static int array_user_compare(const void *a, const void *b TSRMLS_DC)
     */
 
 #define PHP_ARRAY_CMP_FUNC_VARS \
-    zval **old_compare_func; \
     zend_fcall_info old_user_compare_fci; \
     zend_fcall_info_cache old_user_compare_fci_cache \
 
 #define PHP_ARRAY_CMP_FUNC_BACKUP() \
-    old_compare_func = BG(user_compare_func_name); \
     old_user_compare_fci = BG(user_compare_fci); \
     old_user_compare_fci_cache = BG(user_compare_fci_cache); \
     BG(user_compare_fci_cache) = empty_fcall_info_cache; \
@@ -628,7 +625,6 @@ static int array_user_compare(const void *a, const void *b TSRMLS_DC)
 #define PHP_ARRAY_CMP_FUNC_RESTORE() \
         BG(user_compare_fci) = old_user_compare_fci; \
         BG(user_compare_fci_cache) = old_user_compare_fci_cache; \
-        BG(user_compare_func_name) = old_compare_func; \
 
 
 /* {{{ proto bool usort(array array_arg, mixed comparator) U
@@ -3106,11 +3102,6 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
                return_value->value.ht = ht;            
        }
 
-       if ((behavior & INTERSECT_NORMAL) && data_compare_type == INTERSECT_COMP_DATA_USER) {
-               /* array_uintersect() */
-               BG(user_compare_func_name) = args[arr_argc];
-       }
-       
        /* go through the lists and look for common values */
        while (*ptrs[0]) {
                if ((behavior & INTERSECT_ASSOC) /* triggered also when INTERSECT_KEY */
index fa0f8e23732566ebfe95ed096a76180e90e3bdb4..73bd5af7054e611405ecbe906f7833dbc2712db8 100644 (file)
@@ -4080,7 +4080,6 @@ PHP_RINIT_FUNCTION(basic)
        BG(strtok_string) = NULL;
        BG(strtok_zval) = NULL;
        BG(locale_string) = NULL;
-       BG(user_compare_func_name) = NULL;
        BG(array_walk_fci) = empty_fcall_info;
        BG(array_walk_fci_cache) = empty_fcall_info_cache;
        BG(user_compare_fci) = empty_fcall_info;
index 418e25d93ba12580125932bca0f9b26187b78103..61df9ff6bcf3a5f6df179086da4a7f827cadb140 100644 (file)
@@ -166,7 +166,6 @@ typedef struct _php_basic_globals {
        char str_ebuf[40];
        zend_fcall_info array_walk_fci;
        zend_fcall_info_cache array_walk_fci_cache;
-       zval **user_compare_func_name;
        zend_fcall_info user_compare_fci;
        zend_fcall_info_cache user_compare_fci_cache;
        zend_llist *user_tick_functions;