cvs: php4 /main output.c
| From: | Yasuo Ohgaki | Date: | Tue, 05 Feb 2002 07:37:48 +0000 |
| Subject: | cvs: php4 /main output.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-9277@lists.php.net to get a copy of this message | ||
yohgaki Tue Feb 5 02:37:48 2002 EDT
Modified files:
/php4/main output.c
Log:
pval -> zval
Check number of parameters
Index: php4/main/output.c
diff -u php4/main/output.c:1.82 php4/main/output.c:1.83
--- php4/main/output.c:1.82 Tue Dec 11 10:31:03 2001
+++ php4/main/output.c Tue Feb 5 02:37:42 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.82 2001/12/11 15:31:03 sebastian Exp $ */
+/* $Id: output.c,v 1.83 2002/02/05 07:37:42 yohgaki Exp $ */
#include "php.h"
#include "ext/standard/head.h"
@@ -388,7 +388,7 @@
/* {{{ 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 @@
/* {{{ 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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;
}