cvs: php4 /ext/standard/ array.c

From: Date: Sun, 11 Jun 2000 12:20:42 +0000
Subject: cvs: php4 /ext/standard/ array.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-163@lists.php.net to get a copy of this message
venaas Sun Jun 11 05:20:42 2000 EDT Modified files: /php4/ext/standard array.c Log: Forgot to set_compare_func in the new array functions, had only tested with older source. Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.53 php4/ext/standard/array.c:1.54 --- php4/ext/standard/array.c:1.53 Sat Jun 10 12:09:56 2000 +++ php4/ext/standard/array.c Sun Jun 11 05:20:42 2000 @@ -2175,6 +2175,7 @@ for (i = 0, p = target_hash->pListHead; p; i++, p = p->pListNext) arTmp[i] = p; arTmp[i] = NULL; + set_compare_func(SORT_REGULAR); qsort((void *) arTmp, i, sizeof(Bucket *), array_data_compare); /* go through the sorted array and delete duplicates from the copy */ @@ -2220,6 +2221,7 @@ /* for each argument, create and sort list with pointers to the hash buckets */ lists = (Bucket ***)emalloc(argc * sizeof(Bucket **)); ptrs = (Bucket ***)emalloc(argc * sizeof(Bucket **)); + set_compare_func(SORT_REGULAR); for (i=0; i<argc; i++) { if ((*args[i])->type != IS_ARRAY) { php_error(E_WARNING, "Argument #%d to array_intersect() is not an array", i+1); @@ -2317,6 +2319,7 @@ /* for each argument, create and sort list with pointers to the hash buckets */ lists = (Bucket ***)emalloc(argc * sizeof(Bucket **)); ptrs = (Bucket ***)emalloc(argc * sizeof(Bucket **)); + set_compare_func(SORT_REGULAR); for (i=0; i<argc; i++) { if ((*args[i])->type != IS_ARRAY) { php_error(E_WARNING, "Argument #%d to array_intersect() is not an array", i+1);

« previous php.cvs (#163) next »