cvs: php-src /ext/standard microtime.c

From: Date: Thu, 19 Oct 2006 22:14:04 +0000
Subject: cvs: php-src /ext/standard microtime.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-41174@lists.php.net to get a copy of this message
andrei Thu Oct 19 22:14:04 2006 UTC Modified files: /php-src/ext/standard microtime.c Log: getrusage.c was easy(). But don't ever use zend_parse_parameters() like that. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/microtime.c?r1=1.57&r2=1.58&diff_format=u Index: php-src/ext/standard/microtime.c diff -u php-src/ext/standard/microtime.c:1.57 php-src/ext/standard/microtime.c:1.58 --- php-src/ext/standard/microtime.c:1.57 Thu Oct 19 22:11:04 2006 +++ php-src/ext/standard/microtime.c Thu Oct 19 22:14:04 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: microtime.c,v 1.57 2006/10/19 22:11:04 andrei Exp $ */ +/* $Id: microtime.c,v 1.58 2006/10/19 22:14:04 andrei Exp $ */ #include "php.h" @@ -107,7 +107,7 @@ /* }}} */ #ifdef HAVE_GETRUSAGE -/* {{{ proto array getrusage([int who]) +/* {{{ proto array getrusage([int who]) U Returns an array of usage statistics */ PHP_FUNCTION(getrusage) { @@ -115,7 +115,11 @@ long pwho = 0; int who = RUSAGE_SELF; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &pwho) != FAILURE && pwho == 1) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &pwho) == FAILURE) { + return; + } + + if (pwho == 1) { who = RUSAGE_CHILDREN; }

« previous php.cvs (#41174) next »