diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2010-04-13 11:41:40 +0000 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2010-04-13 11:41:40 +0000 |
commit | 6169d91ba759528babafc0599dc4ab975561121a (patch) | |
tree | 89ee13d078c4b683bb6b61d45a08a2067d11132f /ext/standard/pageinfo.c | |
parent | ec5ece6caf45ac92262713c99422f257740fbd37 (diff) | |
download | php-git-6169d91ba759528babafc0599dc4ab975561121a.tar.gz |
* Pass TSRMLS_C around pageinfo.c
* Use zend_parse_parameters_none() in pageinfo.c
Diffstat (limited to 'ext/standard/pageinfo.c')
-rw-r--r-- | ext/standard/pageinfo.c | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index 5efae3635d..004ddb089b 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -79,19 +79,15 @@ PHPAPI void php_statpage(TSRMLS_D) /* {{{ php_getuid */ -long php_getuid(void) +long php_getuid(TSRMLS_D) { - TSRMLS_FETCH(); - php_statpage(TSRMLS_C); return (BG(page_uid)); } /* }}} */ -long php_getgid(void) +long php_getgid(TSRMLS_D) { - TSRMLS_FETCH(); - php_statpage(TSRMLS_C); return (BG(page_gid)); } @@ -101,8 +97,12 @@ long php_getgid(void) PHP_FUNCTION(getmyuid) { long uid; + + if (zend_parse_parameters_none() == FAILURE) { + return; + } - uid = php_getuid(); + uid = php_getuid(TSRMLS_C); if (uid < 0) { RETURN_FALSE; } else { @@ -116,8 +116,12 @@ PHP_FUNCTION(getmyuid) PHP_FUNCTION(getmygid) { long gid; + + if (zend_parse_parameters_none() == FAILURE) { + return; + } - gid = php_getgid(); + gid = php_getgid(TSRMLS_C); if (gid < 0) { RETURN_FALSE; } else { @@ -131,6 +135,10 @@ PHP_FUNCTION(getmygid) PHP_FUNCTION(getmypid) { int pid; + + if (zend_parse_parameters_none() == FAILURE) { + return; + } pid = getpid(); if (pid < 0) { @@ -145,6 +153,10 @@ PHP_FUNCTION(getmypid) Get the inode of the current script being parsed */ PHP_FUNCTION(getmyinode) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } + php_statpage(TSRMLS_C); if (BG(page_inode) < 0) { RETURN_FALSE; @@ -164,7 +176,13 @@ PHPAPI long php_getlastmod(TSRMLS_D) Get time of last page modification */ PHP_FUNCTION(getlastmod) { - long lm = php_getlastmod(TSRMLS_C); + long lm; + + if (zend_parse_parameters_none() == FAILURE) { + return; + } + + lm = php_getlastmod(TSRMLS_C); if (lm < 0) { RETURN_FALSE; } else { @@ -173,7 +191,7 @@ PHP_FUNCTION(getlastmod) } /* }}} */ -/* +/*nma * Local variables: * tab-width: 4 * c-basic-offset: 4 |