From: Stig Venaas Date: Sat, 21 Oct 2000 18:12:30 +0000 (+0000) Subject: Made array_unique use array_type_data_compare instead of array_data_compare X-Git-Tag: php-4.0.4RC3~576 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4edb21002828a42400341d352916f868d5e71359;p=php Made array_unique use array_type_data_compare instead of array_data_compare --- diff --git a/ext/standard/array.c b/ext/standard/array.c index 581e4beff7..4c049888be 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -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;