ohill           Fri Jun 20 18:05:45 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/standard       var.c 
    /php-src/ext/standard/tests/general_functions       
                                                        debug_zval_dump_e.phpt 
                                                        var_dump.phpt 
  Log:
  - New parameter parsing API for var.c & tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var.c?r1=1.203.2.7.2.18.2.8&r2=1.203.2.7.2.18.2.9&diff_format=u
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.203.2.7.2.18.2.8 
php-src/ext/standard/var.c:1.203.2.7.2.18.2.9
--- php-src/ext/standard/var.c:1.203.2.7.2.18.2.8       Fri Jun 20 14:53:57 2008
+++ php-src/ext/standard/var.c  Fri Jun 20 18:05:45 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: var.c,v 1.203.2.7.2.18.2.8 2008/06/20 14:53:57 felipe Exp $ */
+/* $Id: var.c,v 1.203.2.7.2.18.2.9 2008/06/20 18:05:45 ohill Exp $ */
 
 /* {{{ includes
 */
@@ -172,12 +172,8 @@
        int argc;
        int     i;
 
-       argc = ZEND_NUM_ARGS();
-
-       args = (zval ***)safe_emalloc(argc, sizeof(zval **), 0);
-       if (ZEND_NUM_ARGS() == 0 || zend_get_parameters_array_ex(argc, args) == 
FAILURE) {
-               efree(args);
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) 
== FAILURE) {
+               return;
        }
 
        for (i = 0; i < argc; i++) {
@@ -328,12 +324,8 @@
        int argc;
        int     i;
 
-       argc = ZEND_NUM_ARGS();
-
-       args = (zval ***)safe_emalloc(argc, sizeof(zval **), 0);
-       if (ZEND_NUM_ARGS() == 0 || zend_get_parameters_array_ex(argc, args) == 
FAILURE) {
-               efree(args);
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) 
== FAILURE) {
+               return;
        }
 
        for (i = 0; i < argc; i++) {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/debug_zval_dump_e.phpt?r1=1.1.2.1&r2=1.1.2.1.2.1&diff_format=u
Index: php-src/ext/standard/tests/general_functions/debug_zval_dump_e.phpt
diff -u 
php-src/ext/standard/tests/general_functions/debug_zval_dump_e.phpt:1.1.2.1 
php-src/ext/standard/tests/general_functions/debug_zval_dump_e.phpt:1.1.2.1.2.1
--- php-src/ext/standard/tests/general_functions/debug_zval_dump_e.phpt:1.1.2.1 
Sat May 12 10:28:00 2007
+++ php-src/ext/standard/tests/general_functions/debug_zval_dump_e.phpt Fri Jun 
20 18:05:45 2008
@@ -19,5 +19,5 @@
 --EXPECTF--
 *** Testing error conditions ***
 
-Warning: Wrong parameter count for debug_zval_dump() in %s on line %d
+Warning: debug_zval_dump() expects at least %d parameter, %d given in %s on 
line %d
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_dump.phpt?r1=1.1.2.2.2.1&r2=1.1.2.2.2.2&diff_format=u
Index: php-src/ext/standard/tests/general_functions/var_dump.phpt
diff -u php-src/ext/standard/tests/general_functions/var_dump.phpt:1.1.2.2.2.1 
php-src/ext/standard/tests/general_functions/var_dump.phpt:1.1.2.2.2.2
--- php-src/ext/standard/tests/general_functions/var_dump.phpt:1.1.2.2.2.1      
Fri Nov  2 19:41:12 2007
+++ php-src/ext/standard/tests/general_functions/var_dump.phpt  Fri Jun 20 
18:05:45 2008
@@ -1907,5 +1907,5 @@
 
 *** Testing error conditions ***
 
-Warning: Wrong parameter count for var_dump() in %s on line %d
+Warning: var_dump() expects at least %d parameter, %d given in %s on line %d
 Done



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

Reply via email to