iliaa           Wed Dec 25 15:02:03 2002 EDT

  Modified files:              
    /php4/ext/standard  array.c 
  Log:
  Make range operate on the copies of the parameters rather then modify the 
  actual parameters.
  
  
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.211 php4/ext/standard/array.c:1.212
--- php4/ext/standard/array.c:1.211     Fri Dec 20 12:16:31 2002
+++ php4/ext/standard/array.c   Wed Dec 25 15:02:03 2002
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: array.c,v 1.211 2002/12/20 17:16:31 iliaa Exp $ */
+/* $Id: array.c,v 1.212 2002/12/25 20:02:03 iliaa Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -1425,7 +1425,7 @@
        int err = 0, is_step_double = 0;
        double step = 1.0;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz|z", &zlow, &zhigh, 
&zstep) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/z/|z/", &zlow, &zhigh, 
+&zstep) == FAILURE) {
                RETURN_FALSE;
        }
 
@@ -1461,8 +1461,8 @@
                        goto long_str;
                }
                
-               convert_to_string_ex(&zlow);
-               convert_to_string_ex(&zhigh);
+               convert_to_string(zlow);
+               convert_to_string(zhigh);
                low = (unsigned char *)Z_STRVAL_P(zlow);
                high = (unsigned char *)Z_STRVAL_P(zhigh);
 
@@ -1488,8 +1488,8 @@
        } else if (Z_TYPE_P(zlow) == IS_DOUBLE || Z_TYPE_P(zhigh) == IS_DOUBLE || 
is_step_double) {
                double low, high;
 double_str:            
-               convert_to_double_ex(&zlow);
-               convert_to_double_ex(&zhigh);
+               convert_to_double(zlow);
+               convert_to_double(zhigh);
                low = Z_DVAL_P(zlow);
                high = Z_DVAL_P(zhigh);
                
@@ -1516,8 +1516,8 @@
                int low, high;
                long lstep;
 long_str:
-               convert_to_long_ex(&zlow);
-               convert_to_long_ex(&zhigh);
+               convert_to_long(zlow);
+               convert_to_long(zhigh);
                low = Z_LVAL_P(zlow);
                high = Z_LVAL_P(zhigh);
                lstep = (long) step;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to