]> granicus.if.org Git - php/commitdiff
Made array_unique use array_type_data_compare instead of array_data_compare
authorStig Venaas <venaas@php.net>
Sat, 21 Oct 2000 18:12:30 +0000 (18:12 +0000)
committerStig Venaas <venaas@php.net>
Sat, 21 Oct 2000 18:12:30 +0000 (18:12 +0000)
ext/standard/array.c

index 581e4beff78b2b05ed63a00bfa31f90dc9f0c293..4c049888bebc66645a9eb6cb9e3353b2400ef895 100644 (file)
@@ -2246,12 +2246,12 @@ PHP_FUNCTION(array_unique)
                arTmp[i] = p;
        arTmp[i] = NULL;
     set_compare_func(SORT_REGULAR);
-       qsort((void *) arTmp, i, sizeof(Bucket *), array_data_compare);
+       qsort((void *) arTmp, i, sizeof(Bucket *), array_type_data_compare);
 
        /* go through the sorted array and delete duplicates from the copy */
        lastkept = arTmp;
        for (cmpdata = arTmp + 1; *cmpdata; cmpdata++) {
-               if (array_data_compare(lastkept, cmpdata)) {
+               if (array_type_data_compare(lastkept, cmpdata)) {
                        lastkept = cmpdata;
                } else {
                        p = *cmpdata;