summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2002-02-05 07:37:42 +0000
committerYasuo Ohgaki <yohgaki@php.net>2002-02-05 07:37:42 +0000
commita3e676f64b7cc62a6c2a9b4bb749269d46c8bd58 (patch)
treecb0e1deb62f66105ff8828c14fba479904d92076 /main
parent0bf51b81bddf7ac0b6666f896cb32fe9c137c5f2 (diff)
downloadphp-git-a3e676f64b7cc62a6c2a9b4bb749269d46c8bd58.tar.gz
pval -> zval
Check number of parameters
Diffstat (limited to 'main')
-rw-r--r--main/output.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/main/output.c b/main/output.c
index 7799959ddf..d90f38d789 100644
--- a/main/output.c
+++ b/main/output.c
@@ -388,7 +388,7 @@ static void php_ob_prepend(const char *text, uint text_length)
/* {{{ php_ob_get_buffer
* Return the current output buffer */
-int php_ob_get_buffer(pval *p TSRMLS_DC)
+int php_ob_get_buffer(zval *p TSRMLS_DC)
{
if (OG(ob_nesting_level)==0) {
return FAILURE;
@@ -400,7 +400,7 @@ int php_ob_get_buffer(pval *p TSRMLS_DC)
/* {{{ php_ob_get_length
* Return the size of the current output buffer */
-int php_ob_get_length(pval *p TSRMLS_DC)
+int php_ob_get_length(zval *p TSRMLS_DC)
{
if (OG(ob_nesting_level) == 0) {
return FAILURE;
@@ -537,6 +537,9 @@ PHP_FUNCTION(ob_start)
Flush (send) the output buffer */
PHP_FUNCTION(ob_flush)
{
+ if (ZEND_NUM_ARGS() != 0)
+ WRONG_PARAM_COUNT;
+
php_end_ob_buffer(1, 1 TSRMLS_CC);
}
/* }}} */
@@ -545,6 +548,9 @@ PHP_FUNCTION(ob_flush)
Clean (erase) the output buffer */
PHP_FUNCTION(ob_clean)
{
+ if (ZEND_NUM_ARGS() != 0)
+ WRONG_PARAM_COUNT;
+
php_end_ob_buffer(0, 1 TSRMLS_CC);
}
/* }}} */
@@ -553,6 +559,9 @@ PHP_FUNCTION(ob_clean)
Flush (send) the output buffer, and turn off output buffering */
PHP_FUNCTION(ob_end_flush)
{
+ if (ZEND_NUM_ARGS() != 0)
+ WRONG_PARAM_COUNT;
+
php_end_ob_buffer(1, 0 TSRMLS_CC);
}
/* }}} */
@@ -561,6 +570,9 @@ PHP_FUNCTION(ob_end_flush)
Clean (erase) the output buffer, and turn off output buffering */
PHP_FUNCTION(ob_end_clean)
{
+ if (ZEND_NUM_ARGS() != 0)
+ WRONG_PARAM_COUNT;
+
php_end_ob_buffer(0, 0 TSRMLS_CC);
}
/* }}} */
@@ -569,6 +581,9 @@ PHP_FUNCTION(ob_end_clean)
Return the contents of the output buffer */
PHP_FUNCTION(ob_get_contents)
{
+ if (ZEND_NUM_ARGS() != 0)
+ WRONG_PARAM_COUNT;
+
if (php_ob_get_buffer(return_value TSRMLS_CC)==FAILURE) {
RETURN_FALSE;
}
@@ -579,6 +594,9 @@ PHP_FUNCTION(ob_get_contents)
Return the nesting level of the output buffer */
PHP_FUNCTION(ob_get_level)
{
+ if (ZEND_NUM_ARGS() != 0)
+ WRONG_PARAM_COUNT;
+
RETURN_LONG (OG(ob_nesting_level));
}
/* }}} */
@@ -587,6 +605,9 @@ PHP_FUNCTION(ob_get_level)
Return the length of the output buffer */
PHP_FUNCTION(ob_get_length)
{
+ if (ZEND_NUM_ARGS() != 0)
+ WRONG_PARAM_COUNT;
+
if (php_ob_get_length(return_value TSRMLS_CC)==FAILURE) {
RETURN_FALSE;
}