dmitry          Tue Jul  1 10:01:25 2008 UTC

  Modified files:              
    /php-src/ext/standard       formatted_print.c 
  Log:
  Use new parameter parsing API
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/formatted_print.c?r1=1.105&r2=1.106&diff_format=u
Index: php-src/ext/standard/formatted_print.c
diff -u php-src/ext/standard/formatted_print.c:1.105 
php-src/ext/standard/formatted_print.c:1.106
--- php-src/ext/standard/formatted_print.c:1.105        Mon Mar 17 23:07:55 2008
+++ php-src/ext/standard/formatted_print.c      Tue Jul  1 10:01:25 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: formatted_print.c,v 1.105 2008/03/17 23:07:55 stas Exp $ */
+/* $Id: formatted_print.c,v 1.106 2008/07/01 10:01:25 dmitry Exp $ */
 
 #include <math.h>                              /* modf() */
 #include "php.h"
@@ -669,16 +669,13 @@
        char *format, *result, padding;
        int always_sign;
 
-       argc = ZEND_NUM_ARGS();
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) 
== FAILURE) {
+               return NULL;
+       }
 
        /* verify the number of args */
        if ((use_array && argc != (2 + format_offset)) 
                        || (!use_array && argc < (1 + format_offset))) {
-               WRONG_PARAM_COUNT_WITH_RETVAL(NULL);
-       }
-       args = (zval ***)safe_emalloc(argc, sizeof(zval *), 0);
-
-       if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
                efree(args);
                WRONG_PARAM_COUNT_WITH_RETVAL(NULL);
        }



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

Reply via email to