cvs: php4 /ext/standard basic_functions.c /main output.c php_output.h
| From: | Derick Rethans | Date: | Mon, 03 Dec 2001 07:43:55 +0000 |
| Subject: | cvs: php4 /ext/standard basic_functions.c /main output.c php_output.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-8401@lists.php.net to get a copy of this message | ||
derick Mon Dec 3 02:43:55 2001 EDT
Modified files:
/php4/main output.c php_output.h
/php4/ext/standard basic_functions.c
Log:
- Added ob_get_level, which returns the nesting level of the output buffering
mechanism. (patch by Yasuo Ohgaki <yasuo_ohgaki@yahoo.com>)
@- Added ob_get_level, which returns the nesting level of the output buffering
@ mechanism. (Yasuo, Derick)
Index: php4/main/output.c
diff -u php4/main/output.c:1.80 php4/main/output.c:1.81
--- php4/main/output.c:1.80 Fri Nov 30 05:48:38 2001
+++ php4/main/output.c Mon Dec 3 02:43:50 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.80 2001/11/30 10:48:38 derick Exp $ */
+/* $Id: output.c,v 1.81 2001/12/03 07:43:50 derick Exp $ */
#include "php.h"
#include "ext/standard/head.h"
@@ -572,6 +572,14 @@
if (php_ob_get_buffer(return_value TSRMLS_CC)==FAILURE) {
RETURN_FALSE;
}
+}
+/* }}} */
+
+/* {{{ proto integer ob_get_level(void)
+ Return the nesting level of the output buffer */
+PHP_FUNCTION(ob_get_level)
+{
+ RETURN_LONG (OG(ob_nesting_level));
}
/* }}} */
Index: php4/main/php_output.h
diff -u php4/main/php_output.h:1.31 php4/main/php_output.h:1.32
--- php4/main/php_output.h:1.31 Fri Nov 30 05:48:38 2001
+++ php4/main/php_output.h Mon Dec 3 02:43:52 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_output.h,v 1.31 2001/11/30 10:48:38 derick Exp $ */
+/* $Id: php_output.h,v 1.32 2001/12/03 07:43:52 derick Exp $ */
#ifndef PHP_OUTPUT_H
#define PHP_OUTPUT_H
@@ -49,6 +49,7 @@
PHP_FUNCTION(ob_end_clean);
PHP_FUNCTION(ob_get_contents);
PHP_FUNCTION(ob_get_length);
+PHP_FUNCTION(ob_get_level);
PHP_FUNCTION(ob_implicit_flush);
typedef struct _php_ob_buffer {
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.423 php4/ext/standard/basic_functions.c:1.424
--- php4/ext/standard/basic_functions.c:1.423 Fri Nov 30 05:48:38 2001
+++ php4/ext/standard/basic_functions.c Mon Dec 3 02:43:53 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.423 2001/11/30 10:48:38 derick Exp $ */
+/* $Id: basic_functions.c,v 1.424 2001/12/03 07:43:53 derick Exp $ */
#include "php.h"
#include "php_main.h"
@@ -725,6 +725,7 @@
PHP_FE(ob_end_flush, NULL)
PHP_FE(ob_end_clean, NULL)
PHP_FE(ob_get_length, NULL)
+ PHP_FE(ob_get_level, NULL)
PHP_FE(ob_get_contents, NULL)
PHP_FE(ob_implicit_flush, NULL)