cvs: php4 /ext/standard/ array.c levenshtein.c

[email protected] ("Andrei Zmievski")
Newsgroups php.version4
Message-ID <cvsandrei959195237@cvsserver>
andrei		Wed May 24 21:07:17 2000 EDT

  Modified files:
    /php4/ext/standard	array.c levenshtein.c 
  Log:
  @ Fixed min()/max() segfault. (Andrei)
  
  
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.45 php4/ext/standard/array.c:1.46
--- php4/ext/standard/array.c:1.45	Wed May 24 10:41:35 2000
+++ php4/ext/standard/array.c	Wed May 24 21:07:17 2000
@@ -853,6 +853,7 @@
 		php_error(E_WARNING, "min: must be passed at least 1 value");
 		RETURN_NULL();
 	}
+	set_compare_func(SORT_REGULAR);
 	if (argc == 1) {
 		pval **arr;
 
@@ -904,6 +905,7 @@
 		php_error(E_WARNING, "max: must be passed at least 1 value");
 		RETURN_NULL();
 	}
+	set_compare_func(SORT_REGULAR);
 	if (argc == 1) {
 		pval **arr;
 
Index: php4/ext/standard/levenshtein.c
diff -u php4/ext/standard/levenshtein.c:1.6 php4/ext/standard/levenshtein.c:1.7
--- php4/ext/standard/levenshtein.c:1.6	Tue May 23 22:13:10 2000
+++ php4/ext/standard/levenshtein.c	Wed May 24 21:07:17 2000
@@ -15,7 +15,7 @@
    | Author: Hartmut Holzgraefe <[email protected]>                          |
    +----------------------------------------------------------------------+
  */
-/* $Id: levenshtein.c,v 1.6 2000/05/23 20:13:10 hholzgra Exp $ */
+/* $Id: levenshtein.c,v 1.7 2000/05/24 19:07:17 andrei Exp $ */
 
 #include "php.h"
 #include <stdlib.h>
@@ -97,7 +97,8 @@
 
 /* {{{ proto int levenshtein(string str1, string str2)
    Calculate Levenshtein distance between two strings */
-PHP_FUNCTION(levenshtein){
+PHP_FUNCTION(levenshtein)
+{
 	zval **str1, **str2;
 	int l;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.