lstrojny Tue Jul 15 08:50:04 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/main output.c Log: New parameter parsing API http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.4.2.3&r2=1.167.2.3.2.4.2.4&diff_format=u Index: php-src/main/output.c diff -u php-src/main/output.c:1.167.2.3.2.4.2.3 php-src/main/output.c:1.167.2.3.2.4.2.4 --- php-src/main/output.c:1.167.2.3.2.4.2.3 Mon Mar 10 22:12:33 2008 +++ php-src/main/output.c Tue Jul 15 08:50:04 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.167.2.3.2.4.2.3 2008/03/10 22:12:33 felipe Exp $ */ +/* $Id: output.c,v 1.167.2.3.2.4.2.4 2008/07/15 08:50:04 lstrojny Exp $ */ #include "php.h" #include "ext/standard/head.h" @@ -999,24 +999,12 @@ Turn implicit flush on/off and is equivalent to calling flush() after every output call */ PHP_FUNCTION(ob_implicit_flush) { - zval **zv_flag; - int flag; + long flag = 1; - switch(ZEND_NUM_ARGS()) { - case 0: - flag = 1; - break; - case 1: - if (zend_get_parameters_ex(1, &zv_flag)==FAILURE) { - RETURN_FALSE; - } - convert_to_long_ex(zv_flag); - flag = Z_LVAL_PP(zv_flag); - break; - default: - ZEND_WRONG_PARAM_COUNT(); - break; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) { + RETURN_FALSE; } + if (flag) { php_start_implicit_flush(TSRMLS_C); } else {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php